Mafia!

01101 00001 00110 01001 00001! I used to have a database cataloguing which of my friends are townspeople and which are mafia members, but my computer crashed and lost all the data. Obviously, townspeople only tell the truth, and mafia members lie every time they speak. Among my friends, there is one doctor and one detective, both of which are townspeople. Can you figure out which of my 45 friends to trust?

“If Gene is the doctor, then Carly and Ivanka are on the same team; otherwise, Carly and Ivanka are on different teams,” said Amata.

“The doctor is one of Dan, Gus, or Ivanka,” said Amy.

“There are fewer than 20 mafia members,” said Anna.

“The detective is Amy, Donald, Fred, Heidi, or myself,” said Andy.

“Either Barbara is a non-doctor townsperson, and/or Amata is the doctor,” said Ashton.

“Hillary is in the mafia,” said Barack.

“Out of Cory, Clinton, David, and Ivanka, exactly two are mafia members,” said Barbara.

“Barack and Amata are on opposite teams,” said Ben.

“Barbara and David are both townspeople, or Carly and Ibrahim are both townspeople,” said Bernie.

“At least 13 people (other than herself) are on the same team as Gwen.” said Betsy.

“Out of Gene, Grace, and Clinton, at least two of the three are townspeople,” said Carly.

“The number of townspeople is between 21 and 29,” said Carson.

“Hillary and Clinton are both townspeople,” said Chris.

“Either David is the detective, and/or there are four mafia members whose names start with C,” said Clinton.

“Out of Amata, Gene, Grace, and myself, there is at least one doctor and one other townsperson,” said Cory.

“Betsy and Igor are both mafia members,” said Dan.

“Out of Barbara, Bernie, Clinton, and myself, there is a doctor, a detective, and at least one mafia member,” said David.

“The doctor is one of Dan, Gus, or Bernie,” said Debbie.

“There are an odd number of townspeople whose names start with B,” said Devin.

“If Eric is a mafia member, then there fewer than 10 mafia members; if Eric is a townsperson, then there are more than 10 mafia members,” said Donald.

“If Ibrahim is a townsperson, then at least 19 of us are townspeople; if Ibraham is a mafia member, then at least 19 of us are mafia members,” said Ed.

“Ed is a mafia member,” said Elaine.

“The doctor’s name is longer than the detective’s name,” said Elena.

“Among Andy, Carson, and Clinton, there is one detective, no doctor, and no mafia members,” said Elizabeth.

“There is at most one mafia member whose name starts with A,” said Eric.

“Among Barack, Gene, Elena, and Hirono, there is one detective and one mafia member exactly,” said Fiorina.

“Among Amy, Andy, Cory, Elena, Grace, and myself, there are exactly two mafia members,” said Fischer.

“Fewer than 17 of us are townspeople,” said Flynn.

“Amy is a townsperson,” said Frank.

“The detective is either David or myself,” said Fred.

“There are more mafia members whose names start with B than ones whose names start with I,” said Gary.

“Ibrahim and Ivanka are on the same team,” said Gene.

“Neither Ed nor Irene is a mafia member,” said Grace.

“The doctor’s name starts with H,” said Gus.

“Fischer and Ibrahim are on different teams,” said Gwen.

“Gary is either a mafia member or the detective,” said Haley.

“Donald and Grace are on different teams,” said Hank.

“Three or four mafia members have names starting with G,” said Heidi.

“Fiorina is either the doctor or the detective,” said Hillary.

“The doctor is among Elena, Grace, and Heidi,” said Hirono.

“At least one of Ivanka or Elaine is in the mafia,” said Ibrahim.

“There are at least four townspeople whose names start with B,” said Igor.

“Haley is a mafia member,” said Ileana.

“If Flynn is a mafia member, then exactly 27 of us are mafia members; if Flynn is a townsperson, then exactly 31 of us are mafia members,” said Irene.

“Ibrahim, Ed, and Irene are all townspeople,” said Ivanka.

“Andy is the detective,” said Anna.

“Fred is not the detective,” said Carson.

“The doctor is Amy, Gus, or Heidi,” said Elaine.

 

 

Note: An error in Igor’s clue was fixed on Apr. 22.

Answer and recap [SPOILER]