• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 09:42
CEST 15:42
KST 22:42
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
TL.net Map Contest #21: Voting6[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9Maestros of the Game: Live Finals Preview (RO4)5
Community News
Weekly Cups (Oct 6-12): Four star herO65.0.15 Patch Balance Hotfix (2025-10-8)77Weekly Cups (Sept 29-Oct 5): MaxPax triples up3PartinG joins SteamerZone, returns to SC2 competition325.0.15 Balance Patch Notes (Live version)119
StarCraft 2
General
Revisiting the game after10 years and wow it's bad 5.0.15 Patch Balance Hotfix (2025-10-8) TL.net Map Contest #21: Voting The New Patch Killed Mech! Ladder Impersonation (only maybe)
Tourneys
Crank Gathers Season 2: SC II Pro Teams LiuLi Cup - September 2025 Tournaments SC4ALL $6,000 Open LAN in Philadelphia Sparkling Tuna Cup - Weekly Open Tournament Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
External Content
Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers Mutation # 492 Get Out More
Brood War
General
Map with fog of war removed for one player? BW caster Sayle BW General Discussion Pros React To: BarrackS + FlaSh Coaching vs SnOw After 20 seasons we have a lot of great maps
Tourneys
[ASL20] Semifinal A [ASL20] Semifinal B SC4ALL $1,500 Open Bracket LAN [Megathread] Daily Proleagues
Strategy
Relatively freeroll strategies Current Meta BW - ajfirecracker Strategy & Training Siegecraft - a new perspective
Other Games
General Games
Dawn of War IV Stormgate/Frost Giant Megathread Nintendo Switch Thread ZeroSpace Megathread Path of Exile
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
SPIRED by.ASL Mafia {211640} TL Mafia Community Thread
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread Russo-Ukrainian War Thread Men's Fashion Thread Sex and weight loss
Fan Clubs
The herO Fan Club! The Happy Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023 NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Inbreeding: Why Do We Do It…
Peanutsc
From Tilt to Ragequit:The Ps…
TrAiDoS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1902 users

A Puzzling Fortnight - Day 7

Blogs > JeeJee
Post a Reply
JeeJee
Profile Blog Joined July 2003
Canada5652 Posts
February 18 2010 16:26 GMT
#1
Let's jump right into it this time.

You vs me. An even numer of coins (potentially different denominations) are arranged in a line between us, going left-to-right. We are going to play the following game:
We take turns taking a coin from either end of the coin line. The game ends when there are no more coins. The winner is the one whose little pile of coins at the end is worth more than the other's. Simple.

You go first. Devise a strategy such that your pile at the end will always at least match my pile in value.

GL!

(\o/)  If you want it, you find a way. Otherwise you find excuses. No exceptions.
 /_\   aka Shinbi (requesting a name change since 27/05/09 ☺)
onmach
Profile Blog Joined March 2009
United States1241 Posts
Last Edited: 2010-02-18 16:50:31
February 18 2010 16:50 GMT
#2
Hmm, my naive approach. If there are 2 coins, pick the largest. If there are 4 or more coins, add up the values of the coin on the left and second coin from the right, and compare that to the value of the second coin to the left and the coin on the right. If the first number is higher, then take a coin from the left side, and if the second is larger take a coin from the right side.
ieatkids5
Profile Blog Joined September 2004
United States4628 Posts
Last Edited: 2010-02-18 17:02:08
February 18 2010 16:55 GMT
#3
11111111
if all the denominations are the same, then just pick whatever

any other scenario, add up every other number starting at one end, then add up every other number starting from the other end. whichever side you start on that has a greater sum, start picking from that side.

example:
43472191

4+4+2+9=19
3+7+1+1=12

start picking from the side with the 4. your opponent has to take the 3 because if he takes the 1, then you will take the 9. after he takes the 3, take the 4. he will take the 7. take the 2. he takes the 1. you take the 9.

another example:
27261192

2+2+1+9=14
7+6+1+2=16

start from the right side and take the 2. your opponent will take the 9 because you will take it if he doesnt. take the 1. opponent will take next 1 because he cannot take the 2 on the left (or you will take the 7. take the 6. opponent takes the 2. take the 7.



edit - updated with examples
onmach
Profile Blog Joined March 2009
United States1241 Posts
February 18 2010 19:15 GMT
#4
Your solution is simpler, and after looking your examples, mine was clearly defective.
JeeJee
Profile Blog Joined July 2003
Canada5652 Posts
Last Edited: 2010-02-18 20:02:13
February 18 2010 19:48 GMT
#5
On February 19 2010 01:55 ieatkids5 wrote:
11111111
if all the denominations are the same, then just pick whatever

any other scenario, add up every other number starting at one end, then add up every other number starting from the other end. whichever side you start on that has a greater sum, start picking from that side.

example:
43472191

4+4+2+9=19
3+7+1+1=12

start picking from the side with the 4. your opponent has to take the 3 because if he takes the 1, then you will take the 9. after he takes the 3, take the 4. he will take the 7. take the 2. he takes the 1. you take the 9.

another example:
27261192

2+2+1+9=14
7+6+1+2=16

start from the right side and take the 2. your opponent will take the 9 because you will take it if he doesnt. take the 1. opponent will take next 1 because he cannot take the 2 on the left (or you will take the 7. take the 6. opponent takes the 2. take the 7.



edit - updated with examples



i assume you re-calculate these 2 values every time it is your turn?

edit
@onmach
which example shows inadequacy of your strategy? curious..
(\o/)  If you want it, you find a way. Otherwise you find excuses. No exceptions.
 /_\   aka Shinbi (requesting a name change since 27/05/09 ☺)
ieatkids5
Profile Blog Joined September 2004
United States4628 Posts
February 20 2010 02:01 GMT
#6
On February 19 2010 04:48 JeeJee wrote:
Show nested quote +
On February 19 2010 01:55 ieatkids5 wrote:
11111111
if all the denominations are the same, then just pick whatever

any other scenario, add up every other number starting at one end, then add up every other number starting from the other end. whichever side you start on that has a greater sum, start picking from that side.

example:
43472191

4+4+2+9=19
3+7+1+1=12

start picking from the side with the 4. your opponent has to take the 3 because if he takes the 1, then you will take the 9. after he takes the 3, take the 4. he will take the 7. take the 2. he takes the 1. you take the 9.

another example:
27261192

2+2+1+9=14
7+6+1+2=16

start from the right side and take the 2. your opponent will take the 9 because you will take it if he doesnt. take the 1. opponent will take next 1 because he cannot take the 2 on the left (or you will take the 7. take the 6. opponent takes the 2. take the 7.



edit - updated with examples



i assume you re-calculate these 2 values every time it is your turn?

edit
@onmach
which example shows inadequacy of your strategy? curious..

heh oops
yes
Daigomi
Profile Blog Joined May 2006
South Africa4316 Posts
March 03 2010 21:25 GMT
#7
+ Show Spoiler +
You add the value of all the odd numbered coins (coin #1, #3, etc) and all the even numbered coins (coin #2, #4, etc) together. If the odd numbered coins total the highest, you start on the left. If the even numbered coins have the highest total, you start on the right. After that you just pick on the same side as your opponent does every turn.
Moderator
Please log in or register to reply.
Live Events Refresh
OSC
12:00
King of the Hill #227
WardiTV647
IndyStarCraft 131
iHatsuTV 15
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Reynor 239
IndyStarCraft 131
LamboSC2 99
StarCraft: Brood War
Britney 27505
Hyuk 7024
Calm 6161
Rain 3213
Flash 2344
firebathero 992
Soma 818
EffOrt 651
Mini 579
Light 502
[ Show more ]
ZerO 479
BeSt 435
Stork 396
PianO 305
Larva 276
Hyun 258
Snow 239
JYJ111
hero 103
Soulkey 101
Mind 100
Rush 88
Pusan 82
Mong 80
Nal_rA 72
Barracks 60
Backho 57
sorry 48
Shinee 47
zelot 35
Killer 35
Free 32
sas.Sziky 27
yabsab 23
Movie 18
Aegong 18
Terrorterran 14
SilentControl 8
scan(afreeca) 6
Dota 2
qojqva3313
XcaliburYe471
syndereN311
Counter-Strike
allub205
oskar120
Heroes of the Storm
XaKoH 62
Other Games
summit1g6884
singsing2195
olofmeister1337
B2W.Neo799
hiko564
Lowko343
DeMusliM343
crisheroes251
Sick140
Mlord118
Fuzer 118
ArmadaUGS34
Rex24
ZerO(Twitch)9
Organizations
StarCraft: Brood War
UltimateBattle 1061
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 12 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 1300
League of Legends
• TFBlade588
Upcoming Events
Wardi Open
21h 18m
CranKy Ducklings
1d 20h
Safe House 2
2 days
Sparkling Tuna Cup
2 days
Safe House 2
3 days
Tenacious Turtle Tussle
6 days
The PondCast
6 days
Liquipedia Results

Completed

CSL 2025 AUTUMN (S18)
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
ASL Season 20
C-Race Season 1
IPSL Winter 2025-26
EC S1
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025

Upcoming

SC4ALL: Brood War
BSL Season 21
BSL 21 Team A
RSL Offline Finals
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
CranK Gathers Season 2: SC II Pro Teams
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.