# Tag Info

21

This could provide a good starting point, since the structure of the diagrams is simply a cross with four regions that themselves can contain similar crosses, you can simply define a structure to represent this nesting and a recursive function to draw such structures. In my implementation I just use the head c to indicate a cross: dirs = {{1, 0}, {0, 1}, ...

16

Have you seen, that Mathematica is capable of many boolean computations using special boolean functions? Let's assume someone from the island makes a statement, then when the statment is true, whether or not he tells the statement is true, depends on whether or not he is a truth-teller. When we know, which kind he is, we know the correct statement through ...

12

f[n_] := (n (n + 1) (2 n + 1))/6 Easy. The proof by induction involves two steps: Prove the relation for a starting value. We'll take n=1. So f[1] must equal 1^2: f[1] == 1 True Prove that, if the relation holds for a certain n, it also holds for n+1. In this case, for n+1 we have to add (n+1)^2 to the sum you get for n: f[n] + (n + 1)^2 == f[n + ...

5

The possible cardinalities $c+1$ of the set $\{i,j,k,l,m,n\}$ are, of course, $1$ through $6$ inclusive, corresponding to $c=0$ through $5$. Because the question concerns only the relative orders of its elements, then we may--without any loss of generality--replace the elements by their ranks from $0$ (for the smallest) through $c$. Because the answers I ...

4

The Wolfram Alpha example suggests you want to treat $0$ and $1$ as the Boolean values False and True respectively and, with this convention, to parameterize an arbitrary binary Boolean operator $f$ by means of its truth table values $(a,b,c,d)$: f[x_, y_, {a_, b_, c_, d_}] := {1 - x, x} . {{a, b}, {c, d}} . {1 - y, y} (This method exhibits such binary ...

4

Induction has many faces, a straightforward way to prove the equality using induction is 1. RSolve It is superior because we needn't know the formula. Denote s[n] to be the sum 1^2 + 2^2 +...+ n^2 for every natural n, then obviously the axiom of induction is equivalent to : s[n+1] - s[n] == (n+1)^2, and the initial condition is : s[0] == 0, thus : ...

4

Method 1: Resolve The idea is to use the following piece of code: Resolve@Exists[{i, j, k}, i < j && j < k && i < k] (* True *) Resolve@Exists[{i, j, k}, i < j && j == k && i == k] (* False *) Here is a complete solution. lex[{i_, j_}, {k_, l_}] := i < k || i == k && j < l pairCond[{i_, j_}, {k_, ...

4

I don't now that I really understand your question, but from a pure expression manipulation perspective this might be useful: Or @@ And @@@ Tuples[{{a && ! b}, {c, ! c}, {d, ! d}}] (a && ! b && c && d) || (a && ! b && c && ! d) || (a && ! b && ! c && d) || (a ...

4

First convert your conditions to a list of Rules myrules = Apply[List, conditions /. {Equal -> Rule}, {0, 1}] which gives Then Apply those Rules to your List using a pure function and Map (/@) ReplaceAll[{f[x], g[x]}, #] & /@ myrules which produces

3

Actually, ∃! is a standard for "there exists a unique ..." . However, the proposition is false. Consider A(x) where x is greater than 5. There exists lots of x for which x<=5. And surely there is not a unique x, for x>5. To express ∃! in Mathematica one needs Exists[x, A[x]] && ForAll[{a, b}, A[a] && A[b] \[Implies] a == b] Then ...

2

Since I don't know how to incorporate BooleanConvert here is a walkaround for this case: conv = Or @@ Flatten[Outer[ And, {#1}, Sequence @@ Transpose[{Not /@ #2, #2}]] , 2] & . conv @@ {a && ! b, {c}} (a && ! b && ! c) || (a ...

2

MyLogicalExpand[expr_] := With[{patt = "(" ~~ x : (Except[Characters["()"]] ..) ~~ ")" /; ( Implies[#, ! #2] & @@ ( MemberQ[StringPosition[x, LetterCharacter][[;; , 1]], #] & /@ {2, 1})) }, Module[{ cas = StringCases[expr, patt], pos = StringPosition[expr, patt], ...

1

I suspect that this has to do with the assumption b > 0 implicitly stating that b is a real, where that is not the case with b != 0. This is, of course, because there is no natural ordering of complex numbers, but they do have a 0-element to compare against. As evidence for this answer, note that Assuming[Element[b, Reals] && b != 0, ...

1

You can often figure this kind of thing out by looking at the FullForm of the expressions. In this case: {FullForm[{1 -> 2}], FullForm[{1 \[DirectedEdge] 2}]} shows that the first is a Rule while the second is a DirectedEdge and hence they are not equal. On the other hand, when embedded inside Graph, both sides become Graph[List[1, 2], ...

Only top voted, non community-wiki answers of a minimum length are eligible