combinatorics – Using FindInstance to identify feasible planar solutions in a Latin 3D hypercube

Consider a $$3d$$ Latin hypercube with network $$n$$ steps in each dimension so it has $$n ^ 3$$ positions. Coordinates $$X, Y, Z in {1,2, … n }$$. I want to find all the permutations of them where they add to $$S = 3 (n + 1) / 2$$.

The number of permutations is different from zero only when $$n$$ is odd and corresponds to A002047 of the Sloane sequence library. I've forced my way to generate the permutations via `permutations` and `Subsets` and it works well, but I wanted to see if `FindInstance` could do better. It is easier to define the problem.

Here's what I've

``````nn = 3;
ss = 3 (num + 1) / 2;
yvars = Table[y[i], {hostel}]; (* instantiate the y[] and z[] variables *)
zvars = table[z[i], {hostel}];
xvars = Table[x[i] = i, {i, nn}]; (* just set them to {1, ..., nn} *)

(* Force Z to be a permutation *)
between Z = 1 <= zvars <= nn;
unequalZ = unequal @@ zvars;

(* same for Y *)
between Y = 1 <= yvars <= nn;
unequalY = unequal @@ yvars;

(* force the sums to match S *)
sumeqns = xvars + yvars + zvars == Table[ss, {nn}]; (* sum correctly *)

rules = FindInstance[{betweenZ,unequalZ, betweenY, unequalY, sumeqns},
Join @@ {yvars, zvars},
Integers,
20]
Length @ rules
(* 2 *)
``````

It works well except that it is slow. With $$n = 7$$ It takes 22 seconds on my machine to get a single swap. Using my brutal force approach, I can get all the 244 permutations for when $$n = 9$$ in about 3 seconds.

I was wondering if there were other ways to get the constraints to `FindInstance` this might be more appropriate for the treatment in his bowels. Thoughts?

combinatorics – How many lines are defined by points in the 8×8 grid?

I have the task of formulating an approach and calculating how many different lines are defined by points in the 8×8 grid (so 2 ​​points or more are located on the line). The points are distributed evenly ([0,0], [0,1], …, [1,0], [1,1], …, [7,7]).

I've tried partitioning into groups, using symmetry, considering it as a sequence of numbers, then using combinatorics, but it always breaks out in combinations and gives different results at each time. Can anyone tell me how to approach this task?

infinite combinatorics – Is each finite graph an induced minor of \$ omega ^ 2 \$?

Let $$G = (V, E)$$ to be a simple, undirected graph. Assume that $${ cal S}$$ is a collection of non-empty disjoint subsets, connected and in pairs of $$V$$. Let $$G ({ cal S})$$ to be the graph with set of vertices $${ cal S}$$; and $$S neq T in { cal S}$$ form an edge if and only if there is $$x in S, y in T$$ such as $${x, y } in E$$.

Yes $$H$$ is a simple undirected graph, we say that $$H$$ is a minor induced of $$G$$ if there is a collection $${ cal S}$$ non-empty disjoint subsets, connected and in pairs of $$V (G)$$ such as $$H con G ({ cal S})$$.

We do $$omega ^ 2$$ in a graph saying that $${(x_0, y_0), (x_1, y_1) in omega ^ 2$$ form an edge if and only if $$| x_0-x_1 | + | y_0-y_1 | = 1$$ (ie any point and his direct successor in the command of $$omega ^ 2$$ form an edge).

Is each finite graph an induced subgraph of $$omega ^ 2$$?

combinatorics – Convergence of exponential generating functions

On page 10 of "Stanley's Enumerative Combinatorics, Volume 2", $$h (n) = 2 ^ {n choose 2}$$ the number of graphs on a $$n$$set of vertex $$S$$. And let $$c (n)$$ the number of connected graphs on the set of vertices $$S$$. So, using the exponential formula to generate functions,

$$E_ {h} (x) = sum_ {n geq 0} 2 ^ {n choose 2} frac {x ^ n} {n!} = Text {exp} E_ {c} (x) = text {exp} sum_ {n geq1} c (n) frac {x ^ n} {n!}.$$

The book says both $$E_ {h} (x)$$ and $$E_ {c} (x)$$ zero convergence radius. What is the use of the formula above?

In other words, if we have an equality of two exponential generating functions with a zero radius of convergence, can we conclude that the corresponding coefficients are equal?

combinatorics – Search for a single, unique combination for deleting characters in a string

Is there a general formula for determining a unique combination for deleting characters in a 4-character string? Let's say I've $$str1 = {ABCDA}$$ and I want to remove from one position out of four in this chain. So, the whole combination to delete up to four positions of str1 would be:
$$s (1, str1) = BCDA, ACDA, ABDA, ABCA, ABCD = 5$$
$$s (2, str1) = CDA, BDA, BCA, BCD, ADA, ACA, ACD, ABA, ABD, ABC = 10$$
$$s (3, str1) = DA, CA, CD, BA, BD, BC, AA, AD, AC, AB = 10$$
$$s (4, str1) = A, D, C, B, A = 5$$
and gives 30 total, and only 29 unique strings. In general, the total combination could be solved using the formula $$sum_ {k = 1} ^ {r} {{n} choose {k}}$$. However, I could not find a formula for calculating the total unique combination from a given string, since the relative position of the characters determines the total unique combination. Let's say another 5-character long string is str2 = {AAABC}, so the number of unique sequences will be different:
$$s (1, str2) = AABC, AABC, AABC, AAAC, AAAB$$
$$s (2, str2) = ABC, ABC, AAC, AAB, ABC, AAC, AAB, AAC, AAB, AAA$$
$$s (3, str2) = BCA, AC, AB, AC, AB, AA, AC, AB, AA, AA$$
$$s (4, str3) = C, B, A, A, A$$
The total number of combinations is always 30, but the number of unique combinations is reduced to 14. Is there a way to count this unique combination for any string of length n consisting of four characters (A, B, C and D)?

combinatorics – In one test, 0 student solved all the problems. Each problem was solved by 3 students and each pair by 1 student. What is the maximum number of problems?

In a contest, no student has solved all the problems. Each problem was solved by exactly three students and each pair of problems by exactly one student. What is the maximum number of problems in this contest?

This question is taken from the Mathematics Competitions of Alberta High School, but I do not understand the solution. Any help would be appreciated.

combinatorics – Binomial coefficients for negative inputs

Mathematica evaluates the binomial coefficient $$binom {-1} {- 1}$$ This is an application I'm thinking of. However, many books, such as Concrete Mathematics, for example see here, define $$binom {t} {b} = 0$$ for $$b < 0$$. The Mathematica documentation for binomial indicates, rather briefly, that the value is calculated as the limit of the factorial definition via the Gamma function, ie.
as “ an appropriate limit of & # 39; & # 39;
$$binom {t} {b} = Gamma (t + 1) / Gamma (b + 1) Gamma (t-b + 1)$$.

I was wondering if anyone could enlighten us a bit on this issue. Since there are two variables involved, $$(t, b)$$, so taking a limit does not seem well defined.

combinatorics – Relationship between the deficit and the parity of the color classes of the graphs

Let $$G$$ to be a graph with the total summits $$| V (G) |$$. Let the maximum degree of the graph be $$Delta$$. Suppose that the graph is fully colorable (no adjacent vertices, no adjacent edges and no edges, and its incident vertices do not receive the same color) with $$Delta + 1$$ colors. Leave the vertices well colored with $$Delta + 1$$ the colors say, $$c_i i in {1,2, ldots, Delta + 1 }$$. Let $$n_i$$ the number of vertices in the $$i$$color class. In addition, leave $$r$$ the number of $$n_i$$ with $$n_i equiv | V (G) | bmod2$$. So, is it true that $$sum_ {v in V (V)} Delta-d (v) ge Delta-r + 1$$, or $$d (v)$$ is the degree of summit $$v$$?

I think that's true, but the evidence escapes me. Specifically, there is $$r$$ and $$Delta-r + 1$$ color classes of different parity. But how does the deficiency between maximum degree and degree of peak and total colorability value intervene? Note that inequality is not strictly true for graphics that can not be fully colored with $$Delta + 1$$ colors

combinatorics – Discrete mathematics: combination with repetitions

QUESTION: During a period of 7 days, Charles eats a total of
25 donuts. A donut program is a sequence of seven digits, the sum of which is equal to 25, and whose numbers indicate how many donuts Charles eats each day. (3; 2; 7; 4; 1; 3; 5); (2; 3; 7; 4; 1; 3; 5) and (3; 0; 9; 4; 1; 0; 8). How many donuts are there?