Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
link strings # for permutes
|
||||
|
||||
procedure main()
|
||||
givens := set![ "ABCD", "CABD", "ACDB", "DACB", "BCDA", "ACBD", "ADCB", "CDAB", "DABC", "BCAD", "CADB",
|
||||
"CDBA", "CBAD", "ABDC", "ADBC", "BDCA", "DCBA", "BACD", "BADC", "BDAC", "CBDA", "DBCA", "DCAB"]
|
||||
|
||||
every insert(full := set(), permutes("ABCD")) # generate all permutations
|
||||
givens := full--givens # and difference
|
||||
|
||||
write("The difference is : ")
|
||||
every write(!givens, " ")
|
||||
end
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
every x := permutes("ABCD") do # generate all permutations
|
||||
if member(givens,x) then delete(givens,x) # remove givens as they are generated
|
||||
else insert(givens,x) # add back any not given
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
link strings
|
||||
|
||||
procedure main()
|
||||
givens := set("ABCD", "CABD", "ACDB", "DACB", "BCDA", "ACBD",
|
||||
"ADCB", "CDAB", "DABC", "BCAD", "CADB", "CDBA",
|
||||
"CBAD", "ABDC", "ADBC", "BDCA", "DCBA", "BACD",
|
||||
"BADC", "BDAC", "CBDA", "DBCA", "DCAB")
|
||||
|
||||
every p := permutes("ABCD") do
|
||||
if not member(givens, p) then write(p)
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue