This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a scip model for solving the brainteaser at | |
# https://www.braingle.com/brainteasers/teaser.php?id=52558 | |
var xL real; # train length | |
var xR real; # train speed / human speed | |
subto r1: xL>=0; | |
subto r2: xR>=0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a scip model for solving the brainteaser at | |
# https://www.braingle.com/brainteasers/teaser.php?id=52499 | |
set name := {"Sara", "Ophelia", "Nora", "Dawn"}; | |
set month := {"September", "October", "November", "December"}; | |
var x[name * month] binary; | |
# each girl is born in a different month |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a scip model for solving the brainteaser at | |
# https://www.braingle.com/brainteasers/teaser.php?id=48171 | |
set persons:= { "Steve", "Reggie", "Gordon", "Frank" }; | |
set floors := { 1, 2, 3, 4 }; | |
set times := {"3:00", "3:30", "4:15", "5:00"}; | |
var person_floor[persons * floors] binary; | |
var person_time[persons * times ] binary; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a scip model for solving the brainteaser at | |
# https://www.braingle.com/brainteasers/teaser.php?id=52375 | |
set families:= { "Meyer", "Selman", "Vitti" }; | |
set episodes := { | |
"The Way We Weren't", | |
"Simple Simpson", | |
"Fraudcast News", | |
"I, D'oh-bot", | |
"The President Wore Pearls" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a scip model for solving the brainteaser at | |
# https://www.braingle.com/brainteasers/teaser.php?id=52376 | |
set girls := { "Wanda", "Xenia", "Yolanda", "Zoe" }; | |
param last := card(girls); | |
set positions := { 1 .. last }; | |
var xbaseball[girls] binary; | |
var xsoccer[girls] binary; | |
var xbasketball[girls] binary; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a scip model for solving the brainteaser at | |
# https://www.braingle.com/brainteasers/teaser.php?id=52386 | |
set statements := { 0 .. 5 }; | |
var x[statements] binary; | |
subto r0: vif (x[0]==1) | |
then sum <s> in statements: x[s] >= 4 | |
else sum <s> in statements: x[s] <= 3 end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a scip model for solving the brainteaser at | |
# https://www.braingle.com/brainteasers/teaser.php?id=52373 | |
set persons := { "Allie", "Kaleb", "Leah" }; | |
set roles := { "scientist", "psychologist", "lapidary" }; | |
var x[persons*roles] binary; | |
subto x1: forall <p> in persons do sum <r> in roles : x[p,r] == 1; | |
subto x2: forall <r> in roles do sum <p> in persons : x[p,r] == 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a scip model for solving the brainteaser at | |
# https://www.braingle.com/brainteasers/teaser.php?id=52285 | |
set persons := {"Quinn", "Ralph", "Steve"}; | |
var Turner[persons] binary; | |
var Lerner[persons] binary; | |
subto LorT: forall <p> in persons: Lerner[p] == 1 - Turner[p]; | |
subto Q_t: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a scip model for solving the brainteaser at | |
# https://www.braingle.com/brainteasers/teaser.php?id=52271 | |
set players := {"Ace", "Callie", "Draco", "Emma", "Eric", | |
"Holly", "Leah", "Misty", "Quinn", "Xander"}; | |
set teams := { "red", "green", "blue", "black", "white"}; | |
set places := { 1 .. card(teams) }; | |
var x[players * teams] binary; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a scip model for solving the brainteaser at | |
# https://www.braingle.com/brainteasers/teaser.php?id=52323 | |
param A:=1; param B:=2; param C:=3; param D:=4; | |
param E:=5; param F:=6; param G:=7; | |
set women := { A, B, C, D }; | |
set men := { E, F, G }; | |
set people := women + men; |