• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 20:24
CET 02:24
KST 10:24
  • 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
ByuL: The Forgotten Master of ZvT25Behind the Blue - Team Liquid History Book18Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8
Community News
Weekly Cups (Feb 9-15): herO doubles up2ACS replaced by "ASL Season Open" - Starts 21/0241LiuLi Cup: 2025 Grand Finals (Feb 10-16)46Weekly Cups (Feb 2-8): Classic, Solar, MaxPax win2Nexon's StarCraft game could be FPS, led by UMS maker16
StarCraft 2
General
How do you think the 5.0.15 balance patch (Oct 2025) for StarCraft II has affected the game? Behind the Blue - Team Liquid History Book ByuL: The Forgotten Master of ZvT Liquipedia WCS Portal Launched Kaelaris on the futue of SC2 and much more...
Tourneys
PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar) Sparkling Tuna Cup - Weekly Open Tournament StarCraft Evolution League (SC Evo Biweekly) How do the "codes" work in GSL? LiuLi Cup: 2025 Grand Finals (Feb 10-16)
Strategy
Custom Maps
Map Editor closed ? [A] Starcraft Sound Mod
External Content
Mutation # 514 Ulnar New Year The PondCast: SC2 News & Results Mutation # 513 Attrition Warfare Mutation # 512 Overclocked
Brood War
General
CasterMuse Youtube A cwal.gg Extension - Easily keep track of anyone A new season just kicks off Recent recommended BW games BGH Auto Balance -> http://bghmmr.eu/
Tourneys
Escore Tournament StarCraft Season 1 [Megathread] Daily Proleagues [LIVE] [S:21] ASL Season Open Day 1 Small VOD Thread 2.0
Strategy
Simple Questions, Simple Answers Zealot bombing is no longer popular? Fighting Spirit mining rates Current Meta
Other Games
General Games
Nintendo Switch Thread Battle Aces/David Kim RTS Megathread New broswer game : STG-World Diablo 2 thread ZeroSpace Megathread
Dota 2
Official 'what is Dota anymore' discussion
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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Mexico's Drug War Canadian Politics Mega-thread Ask and answer stupid questions here!
Fan Clubs
The IdrA Fan Club The herO Fan Club!
Media & Entertainment
[Req][Books] Good Fantasy/SciFi books [Manga] One Piece Anime Discussion Thread
Sports
Formula 1 Discussion 2024 - 2026 Football Thread TL MMA Pick'em Pool 2013
World Cup 2022
Tech Support
TL Community
The Automated Ban List
Blogs
ASL S21 English Commentary…
namkraft
Inside the Communication of …
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Life Update and thoughts.
FuDDx
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1472 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
00:00
OSC Elite Rising Star #17.5
CranKy Ducklings118
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SteadfastSC 202
RuFF_SC2 161
PiGStarcraft147
Nathanias 75
Temp0 37
StarCraft: Brood War
GuemChi 1635
Artosis 722
NaDa 16
Dota 2
syndereN327
Counter-Strike
fl0m1439
Fnx 1133
taco 520
Super Smash Bros
hungrybox439
PPMD50
Other Games
summit1g13267
shahzam570
C9.Mang0385
Maynarde137
Trikslyr82
ArmadaUGS10
Organizations
Other Games
gamesdonequick1056
Counter-Strike
PGL577
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• Hupsaiya 82
• Mapu1
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• masondota21635
Other Games
• Scarra1416
• imaqtpie1250
• Shiphtur178
Upcoming Events
WardiTV Winter Champion…
10h 36m
Replay Cast
1d 7h
WardiTV Winter Champion…
1d 10h
The PondCast
2 days
Replay Cast
2 days
Korean StarCraft League
4 days
CranKy Ducklings
4 days
SC Evo Complete
4 days
Replay Cast
4 days
Sparkling Tuna Cup
5 days
[ Show More ]
uThermal 2v2 Circuit
5 days
Replay Cast
6 days
Wardi Open
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-02-22
LiuLi Cup: 2025 Grand Finals
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Acropolis #4 - TS5
Jeongseon Sooper Cup
Spring Cup 2026
WardiTV Winter 2026
PiG Sty Festival 7.0
Nations Cup 2026
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025

Upcoming

[S:21] ASL SEASON OPEN 2nd Round
[S:21] ASL SEASON OPEN 2nd Round Qualifier
Acropolis #4 - TS6
Acropolis #4
IPSL Spring 2026
HSC XXIX
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
RSL Revival: Season 4
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
FISSURE Playground #3
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
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 © 2026 TLnet. All Rights Reserved.