How can I check if a ideal has a direct sum decomposition? [GAP] - gap-system

I need a function to check if a left ideal of a Group Algebra has a direct sum decomposition or not. So, I need a functon that return true if the left ideal has a direct sum decomposition or false if the left ideal doesn't have a direct sum decomposition (so the left ideal is irreducible). Just a function that verify if a left ideal is irreducible can help too.
Is there a function to do this?

Related

Searching for groups of objects given a reduction function

I have a few questions about a type of search.
First, is there a name and if so what is the name of the following type of search? I want to search for subsets of objects from some collection such that a reduction and filter function applied to the subset is true. For example, say I have the following objects, each of which contains an id and a value.
[A,10]
[B,10]
[C,10]
[D,9]
[E,11]
I want to search for "all the sets of objects whose summed values equal 30" and I would expect the output to be, {{A,B,C}, {A,D,E}, {B,D,E}, {C,D,E}}.
Second, is the only strategy to perform this search brute-force? Is there some type of general-purpose algorithm for this? Or are search optimizations dependent on the reduction function?
Third, if you came across this problem, what tools would you use to solve it in a general way? Assume the reduction and filter functions could be anything and are not necessarily the sum function. Does SQL provide a good API for this type of search? What about Prolog? Any interesting tips and tricks would be appreciated.
Thanks.
I cannot comment on the problem in general but brute forcing search can be easily done in prolog.
w(a,10).
w(b,10).
w(c,10).
w(d,9).
w(e,11).
solve(0, [], _).
solve(N, [X], [X|_]) :- w(X, N).
solve(N, [X|Xs], [X|Bs]) :-
w(X, W),
W < N,
N1 is N - W,
solve(N1, Xs, Bs).
solve(N, [X|Xs], [_|Bs]) :- % skip element if previous clause fails
solve(N, [X|Xs], Bs).
Which gives
| ?- solve(30, X, [a, b, c, d, e]).
X = [a,b,c] ? ;
X = [a,d,e] ? ;
X = [b,d,e] ? ;
X = [c,d,e] ? ;
(1 ms) no
Sql is TERRIBLE at this kind of problem. Until recently there was no way to get 'All Combinations' of row elements. Now you can do so with Recursive Common Table Expressions, but you are forced by its limitations to retain all partial results as well as final results which you would have to filter out for your final results. About the only benefit you get with SQL's recursive procedure is that you can stop evaluating possible combinations once a sub-path exceeds 30, your target total. That makes it slightly less ugly than an 'evaluate all 2^N combinations' brute force solution (unless every combination sums to less than the target total).
To solve this with SQL you would be running an algorithm that can be described as:
Seed your result set with all table entries less than your target total and their value as a running sum.
Iteratively join your prior result with all combinations of table that were not already used in the result set and whose value added to running sum is less than or equal to target total. Running sum becomes old running sum plus value, and append ID to ID LIST. Union this new result to the old results. Iterate until no more records qualify.
Make a final pass of the result set to filter out the partial sums that do not total to your target.
Oh, and unless you make special provisions, solutions {A,B,C}, {C,B,A}, and {A,C,B} all look like different solutions (order is significant).

What is the general name of this vector sum problem?

Given the USDA nutrient database: n vectors where each dimension is a particular nutrient,
find a set S of foods F whose vectors sum to .ge. RDA and .lt. any toxic value. Add various other constraints to the model, e.g., calories, mass.
Solve for any combination of vectors that meet the constraints.
Currently available websites allow one to choose foods one at a time and build a "recipe". I'm looking for a computational solution. I suspect that this is a trivial problem that someone has already solved. I am looking for the search terms that describe this sort of scenario.
"Deep learning" looks for patterns, but the goal "pattern" is an input. Probability is not involved, so a sizable chunk of ML is not applicable. I intuit that some sort of tree-traversal might be useful.
This is a combination of set theory and vector math. I expect that there exists a large solution set of sets.
I can set up the input vectors as parameterized SQL queries. I have downloaded the USDA nutrient database and loaded it into mariadb.
pseudocode:
Select *
from subset_nutrients
join rda_nutrs on nutrients.nut-1 = rda-nuts.nut-1 join toxicity on nutrients.nut-1 = toxicity.nut-t1
where sum(nut-1scalar) >= rda-1scalar and sum(nut-2scalar) >=rda-2scalar {etc} and sum(nut-1scalar) < toxicity.nut1_t_scalar and sum(nut-2scalar) < toxicity.nut2_t_scalar {etc}
SQL might actually solve the problem all by itself?
I am looking for human-suggested search terms to find original sources of information. Thank you for your suggestions.

Designing a minor circuit

I've got this assignment that demands designing a minor circuit of 3 inputs so that the circuit returns the value of the less seen input.I've tried numerous times,but it seems like I'm stuck. Any hint would be appreciated.
You should drawing up a truth table of the three inputs, and the expected/ desired output.
To get the correct result, probably you could use an ADDER (or perhaps 2). You could sum A, B and C inputs. If more than 2 inputs are true, the "least seen" will be false. If less than 2 inputs are true, the "least seen" will be true.
Look up what gates are needed to implement an ADDER (possibly with carry) and then test its output.
The optimized solution might be simpler than this, but that shoudl give you some ideas.

How to get features *not equal* to a spatial intersection?

I'm trying to get features back that are outside the intersection of themselves and a polygon defined in a query.
When I run the query with the intersection set to true (ie. =1) the results are normal and expected.
However, when I use the not equal to flag (!= or <>), I get very unexpected numbers - many records per student, and even when using the distinct flag, it seems the STIntersects function isn't respected.
select
Students.shape
from Students
join
Boundaries
on (Points.shape.STIntersects(Boundaries.shape) !=1)
where Boundaries.BNum = '408'
Can the STIntersects function handle this type of request?
Thanks!!!
Further to this, the STDisjoint function will return multiple records as it will test the intersection (or lack thereof) for points against multiple polygons.
So the real answer was to use the STIntersects function as a sub-selection, and basically grab all the features that are NOT IN that sub selection.
A post describing this can be found here.

$S_{10}$, the symmetric group and GAP

Here is a question. As you see, the problem's established on finding an element of a certain order in $S_{10}$. I tried to do this question by using GAP. But, GAP couldn't handle the symmetric group $S_{10}$. What can we do in this situation? Is there a way for defining this large finite group for GAP? Thanks for your time.
I'd be really interested to see what you've tried. Anyhow, and in particular, for the symmetric group where conjugacy classes are well known, you can easily examine orders of their representatives:
gap> 15 in List(ConjugacyClasses(SymmetricGroup(10)),c->Order(Representative(c)));
true
Moreover, you can use the character table library without even constructing the group itself:
gap> 15 in OrdersClassRepresentatives(CharacterTable("S10"));
true