Skip to content

Instantly share code, notes, and snippets.

@qnighy
Created August 22, 2014 14:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qnighy/81bad2820567aacc3cbc to your computer and use it in GitHub Desktop.
Save qnighy/81bad2820567aacc3cbc to your computer and use it in GitHub Desktop.
エロ漫画か何かの1シーン https://twitter.com/t4nsu/status/502612362915229697/photo/1 が論理パズルだったのでAlloyで解こうとしてみた
abstract sig Person {
anal_sex_with : set Person,
sex_with : set Person,
female_sex_with : set Person,
fellatio_with : set Person
}
sig Male in Person { }
fun Female : set Person { Person - Male }
// pred Female[x:Person] { x not in Male }
one sig A, B, C, D, E, F, G, H extends Person { }
one sig Akira, Shinya, Hiroshi, Chiaki, Saki, Yuri, Mika, Reina in Person { }
pred Foo {
// general assumption
(B + C + F + H) = Male
(Akira + Shinya + Hiroshi + Chiaki) = Male
(Saki + Yuri + Mika + Reina) = Female
Person.~sex_with in Male
Person.sex_with in Female
Person.female_sex_with in Female
female_sex_with = ~female_sex_with
Person.~fellatio_with in Male
no (iden & anal_sex_with)
no (iden & sex_with)
no (iden & female_sex_with)
no (iden & fellatio_with)
// A's hint
(A.female_sex_with + A) = Female
// B's hint
no (B.sex_with & Mika)
// C's hint
(Mika + Chiaki) in C.anal_sex_with
no C.sex_with
// D's hint
D.~fellatio_with = Shinya
D.~female_sex_with = Yuri // here
D.~(sex_with+anal_sex_with) = Hiroshi
Reina in Hiroshi.(sex_with+anal_sex_with)
// E's hint
not E = Saki // here
no E.~fellatio_with
no Saki.~fellatio_with
Reina in E.female_sex_with
// F's hint
Saki in F.sex_with
Chiaki in F.anal_sex_with
// G's hint
Saki in Akira.sex_with
// H's hint
Chiaki = B
Mika in H.fellatio_with
}
run Foo for 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment