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/52694/the-great-mammoth-race.html | |
param Durk:=1; param Uck:=2; param Thag:=3; param Glook:=4; param Grog:=5; | |
set cavemen := {Durk, Uck, Thag, Glook, Grog}; | |
param ElPasaurus:=1; param Tarpittsburgh:=2; param Sacromagnon:=3; param Seanderthal:=4; param Caveland:=5; | |
set places := {ElPasaurus, Tarpittsburgh, Sacromagnon, Seanderthal, Caveland}; | |
param Fluffy:=1; param Tusky:=2; param Stinky:=3; param Stampy:=4; param Trunky:=5; |
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/52674/if-your-friend-jumped-off-a-cliff-would-you-know-her-height.html | |
param Lisa:=1; param Martha:=2; param Nora:=3; param Ophelia:=4; param Pansy:=5; | |
set swimmers := {Lisa, Martha, Nora, Ophelia, Pansy}; | |
# height order | |
# 1:5'2, 2:5'4, 3:5'6, 4:5'8, or 5:5'10 | |
var height[swimmers] integer >=1 <= card(swimmers); |
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=52380 | |
set persons := { "Luke", "Lily", "Lilac", "Liam", "Lisa" }; | |
var person_tells_the_truth[persons] binary; | |
var person_is_mute[persons] binary; | |
subto speaking: | |
person_is_mute["Lilac"]+person_is_mute["Liam"]+person_is_mute["Lisa"] == 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=52606 | |
set pieces := { 1/4, 1/3, 1/2, 2/3, 3/4, 1 }; | |
var personA_gets[pieces] binary; | |
# 0: this piece goes to person B, 1: this piece goes to person A | |
var total_pie; | |
subto i1: sum <x> in pieces: x == total_pie; |
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=52607 | |
set persons := { "Angie", "Carla", "Colt", "Eric", "June", "Oliver" }; | |
var first_last[persons*persons] binary; | |
subto i1: forall <x> in persons: sum <y> in persons: first_last[x,y] == 1; | |
subto i2: forall <x> in persons: sum <y> in persons: first_last[y,x] == 1; | |
var same_first_last[persons] 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=52660 | |
var a integer >=1; var b integer >=1; var o integer >=1; | |
var p; | |
subto c1: b*a + b*b + (a+b) * o == 35; | |
subto c2: a + 2*b + o == p; |
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=52594 | |
param HE := 1; | |
param HH := 2; | |
param HS := 3; | |
param HD := 4; | |
param HB := 5; | |
param male := 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=52440 | |
param Mo := 1; | |
param Tu := 2; | |
param We := 3; | |
param Th := 4; | |
param Fr := 5; | |
param Sa := 6; | |
param Su := 7; |
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=52457 | |
param Trixie := 1; param Ursula := 2; param Violet := 3; | |
param down := 0; param up := 1; | |
set persons := { Trixie, Ursula, Violet }; | |
set sides := {down..up}; | |
param Combinations := card(sides) * card(sides) * card(sides); |
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=52453 | |
param N := 7; | |
set statements := {1..N}; | |
var X integer >=0 <=N; | |
var x[statements] binary; | |
subto xt: sum <i> in statements: x[i] == X; |
NewerOlder