Tag Info

New answers tagged

1

Here's a way than works for any number of variables: numbering = 2^(Length[#] - 1) (2 - FromDigits[#, 1/2]) &; tablesubset = Reverse /@ Reverse@Tuples[{0, 1}, {3}][[All, {1, 3}]]; (* {A, C} *) Grid@Join[#, List /@ numbering /@ #, 2] &@ tablesubset (If all you want is a numbering, then just FromDigits[#, 2] & seems quite easy, as well as ...


3

In version 10, the new geometric computation functionality supports this. It operates with region objects. Many graphics primitives, including Disk and Rectangle can be used as regions. Boolean operations include RegionUnion, RegionIntersect, RegionDifference, RegionSymmetricDifference and BooleanRegion. Example: ...


0

Step for step: m = {{1, 1}, {0, 1}, {1, 1}, {0, 1}, {1, 0}, {0, 0}, {1, 0}, {0, 0}}; a = DeleteDuplicates@m {{1, 1}, {0, 1}, {1, 0}, {0, 0}} b = Range@Length@a {1, 2, 3, 4} c = MapThread[Rule, {a, b}] {{1, 1} -> 1, {0, 1} -> 2, {1, 0} -> 3, {0, 0} -> 4} d = m /. c {1, 2, 1, 2, 3, 4, 3, 4} Join[m, List /@ d, 2] // TableForm ...



Top 50 recent answers are included