• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 14:32
CEST 20:32
KST 03:32
  • 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
Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun10[ASL21] Ro8 Preview Pt1: Inheritors16[ASL21] Ro16 Preview Pt2: All Star10Team Liquid Map Contest #22 - The Finalists21[ASL21] Ro16 Preview Pt1: Fresh Flow9
Community News
2026 GSL Season 1 Qualifiers25Maestros of the Game 2 announced92026 GSL Tour plans announced15Weekly Cups (April 6-12): herO doubles, "Villains" prevail1MaNa leaves Team Liquid25
StarCraft 2
General
Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun Team Liquid Map Contest #22 - The Finalists Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool MaNa leaves Team Liquid Maestros of the Game 2 announced
Tourneys
GSL Code S Season 1 (2026) SC2 INu's Battles#15 <BO.9 2Matches> WardiTV Spring Cup RSL Revival: Season 5 - Qualifiers and Main Event SEL Masters #6 - Solar vs Classic (SC: Evo)
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
The PondCast: SC2 News & Results Mutation # 523 Firewall Mutation # 522 Flip My Base Mutation # 521 Memorable Boss
Brood War
General
Pros React To: Leta vs Tulbo (ASL S21, Ro.8) [TOOL] Starcraft Chat Translator ASL21 General Discussion JaeDong's ASL S21 Ro16 Post-Review Missed out on ASL tickets - what are my options?
Tourneys
[ASL21] Ro8 Day 1 [ASL21] Ro16 Group D Small VOD Thread 2.0 [ASL21] Ro8 Day 2
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers What's the deal with APM & what's its true value Any training maps people recommend?
Other Games
General Games
Stormgate/Frost Giant Megathread Daigo vs Menard Best of 10 Nintendo Switch Thread Dawn of War IV Diablo IV
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
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 Five o'clock TL Mafia
Community
General
US Politics Mega-thread European Politico-economics QA Mega-thread Russo-Ukrainian War Thread 3D technology/software discussion Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion McBoner: A hockey love story
World Cup 2022
Tech Support
streaming software Strange computer issues (software) [G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Sexual Health Of Gamers
TrAiDoS
lurker extra damage testi…
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2560 users

Harder Math/CS Problem - Page 2

Blogs > Slithe
Post a Reply
Prev 1 2 All
BottleAbuser
Profile Blog Joined December 2007
Korea (South)1888 Posts
January 23 2008 06:07 GMT
#21
Heck, using the lines is redundant! You can use the first 3 bits! Screw me, I thought I was being clever.

Now I'm sure there's a way to send more data. I'm gonna lose sleep over this.
Compilers are like boyfriends, you miss a period and they go crazy on you.
Muirhead
Profile Blog Joined October 2007
United States556 Posts
Last Edited: 2008-01-23 06:13:11
January 23 2008 06:09 GMT
#22
starleague.mit.edu
zdd
Profile Blog Joined October 2004
1463 Posts
Last Edited: 2008-01-23 06:11:15
January 23 2008 06:10 GMT
#23
Yeah, you can even use the matrix itself without calculating parity like this:
given matrix:
11011001
01010010
10101010
01010101
10111001
11010010
10110110
signal A:
01011001
01010010
10101010
01010101
10111001
11010010
10110110
signal B:
10011001
01010010
10101010
01010101
10111001
11010010
10110110
signal C:
11111001
01010010
10101010
01010101
10111001
11010010
10110110
signal D:
11011001
01010010
10101010
01010101
10111001
11010010
10110110

edit: oh nvm you figured it out already, while I was typing.
All you need in life is a strong will to succeed and unrelenting determination. If you meet these prerequisites, you can become anything you want with absolutely no luck, fortune or natural ability.
BottleAbuser
Profile Blog Joined December 2007
Korea (South)1888 Posts
Last Edited: 2008-01-23 06:44:43
January 23 2008 06:25 GMT
#24
Okay, how's this scheme: We're making parity useful now.

The signals A, B, C, or D can be found by looking at the first three bits in the first line.

However, we can also send signals A', B', C', and D' by the following method.

If the starting parity of the first line is the same as the parity of the second line, then we will send A, B, C, or D on the SECOND line. These will denote A', B', C', and D', in the resulting state where the parity of the first and second lines are DIFFERENT. A, B, C, and D can still be sent via the first line. Therefore, if the parities of the lines are different, the receiver looks at the second line, and if they are the same, the receiver looks at the first line.

However, in the case that the parities are different to start with, we're going to write in the opposite side of the first case.

Now, we can send 8 different messages!

Err, no, that's wrong. It won't work

I need hint, or the bottle abuser will be getting angry.
Compilers are like boyfriends, you miss a period and they go crazy on you.
Polemarch
Profile Joined August 2005
Canada1564 Posts
Last Edited: 2008-01-23 06:46:51
January 23 2008 06:45 GMT
#25
Woo got it.

Here's a proof that the upper bound is 64:
+ Show Spoiler [Proof upper bound is 64] +

Suppose 65 messages were possible. Take any initial starting matrix, then the sender can send at most 64 matrices (by picking one of the 64 entries to switch from the initial one); so at least one of the messages is unsendable, no matter how you assign matrices to messages.


Now here's a protocol that achieves 64.
+ Show Spoiler [Description - might make sense] +

Instead of having an 8x8 matrix with 64 entries, let's have a 2x2 matrix with 4 entries and show how to get easily 4 messages in a generalizable way.

For a matrix M, the decoder calculates the following two functions:
f_0(M) = count if the number of 1's in the first column is even
f_1(M) = count if the number of 1's in the first row is even
Then there's 4 possible messages formed by combining the two possibilities in each of f_0, f_1.

The encoder does the following:

Call the initial matrix the encoder gets N. Say he wants to send the message g_0, g_1. So he calculates f_0(N), f_1(N). Then if he wants to change f_0 (i.e. g_0 is different from f_0(N)), then he needs to make a change in the first column. Similarly, if he wants to change f_1 then he needs to make a change in the first row. He can choose to do this independently for rows and columns, e.g. if he wants to change both f_0 and f_1, he can change the entry in the first row and first column; if he wants to change just f_0, then he can change the entry in the first column, second row. So he can send any two bits this way, no matter what the starting arrangements are.

You can generalize this argument to sending 3 bits (i.e. 8 messages) using the 8 corners of a cube instead of a matrix. To do this, the receiver now looks at the rows, columns, and the towers along the 3rd dimension. (The receiver will now be adding up 4 numbers each time.)

You can also generalize it to sending 6 bits (i.e. 64 messages) using the 64 corners of a 6-dimensional hypercube. This is the same as the 8x8 matrix in the original problem if you rearrange the 64 numbers in the 8x8 matrix.


+ Show Spoiler [Description - probably won't mak…] +

... but it's a little more rigorous.

Number the entries of the matrix from 0 to 63, and let M(a0, a1, a2, a3, a4, a5) represent the value of the matrix at the entry when you think of a5,a4,a3,a2,a1,a0 as a binary number (a5 * 2^5 + a4 * 2^4 + ... + a0).

The receiver defines 6 functions:
f_0 = parity of the sum of M(a0, a1, a2, a3, a4, a5) where a0 = 1. i.e. sum over a1, a2, a3, a4, a5 in {0, 1} of M(1, a1, a2, a3, a4, a5) mod 2.
and similarly
f_i = parity of the sum of M(a0, a1, a2, a3, a4, a5) where a_i = 1.
Then the receiver decodes the matrix by treating the 6 bits f_0, f_1, ... f_5 as a binary number, so there are 64 possibilities.

The encoder does the following:
Given the initial matrix M, he calculates f_i(M). Then he picks the 6 bits g_0, g_1, ... g_5 for the message he wants to encode. Let S be the subset of {0, 1, 2, 3, 4, 5} of indices i where f_i(M) != g_i. Then he alters M by changing the entry formed by binary number formed by sum_{s in S}{2^s}. e.g. if he wants to change bits #2, 3, then he toggles the entry at (0, 1, 1, 0, 0, 0).


I BELIEVE IN CAPITAL LETTER PUNISHMENT!!!!!
BottleAbuser
Profile Blog Joined December 2007
Korea (South)1888 Posts
January 23 2008 06:56 GMT
#26
Polemarch, you got that yourself right?

I am so bitterly disappointed at myself and filled with jealousy. Be aware that you have just made a lifelong enemy. >_<
Compilers are like boyfriends, you miss a period and they go crazy on you.
Polemarch
Profile Joined August 2005
Canada1564 Posts
January 23 2008 07:07 GMT
#27
oh no, I don't want a lifelong enemy with such an awesome sig, haha. I already pasted that to some other people after seeing some random post of yours.

I did get that myself, but it is tough - spent probably a couple hours working on it. And I did a fair number of math contests before and a couple degrees in CS, so I'm kind of used to this kind of thinking.
I BELIEVE IN CAPITAL LETTER PUNISHMENT!!!!!
Muirhead
Profile Blog Joined October 2007
United States556 Posts
Last Edited: 2008-01-23 07:09:39
January 23 2008 07:08 GMT
#28
haha Polemarch that's beautiful... I had a proof but it was totally nonconstructive (based on symmetry in the corresponding graph). I got the 2x2 case constructively but had no idea how to extend it. I'll have to remember that trick of extending the dimensions to preserve symmetry. I suck so much at combinatorics... It is my achilles' heel on math Olympiad competitions

Thanks so much for the proof. Polemarch did you used to do the Olympiads or perhaps the Putnam?
starleague.mit.edu
Muirhead
Profile Blog Joined October 2007
United States556 Posts
January 23 2008 07:21 GMT
#29
By the way if the OP could continue posting things around this difficulty level that would be wonderful. I need some practice with combinatorics.
starleague.mit.edu
Slithe
Profile Blog Joined February 2007
United States985 Posts
January 23 2008 08:21 GMT
#30
Oh my god Polemarch you got one of the answers that's amazing. Massive respect.

The answer Polemarch got is a geometric approach to the problem using Hypercubes. I've heard two other answers before. One involves something about power sets, it's similar to the Hypercube solution I think. The other one is a very elegant solution that utilizes XOR as part of the answer.
Slithe
Profile Blog Joined February 2007
United States985 Posts
Last Edited: 2008-01-23 08:29:51
January 23 2008 08:25 GMT
#31
Also, I can probably muster up some other problems, but ones of this difficulty may not come by so often.

I'll put up another problem tomorrow, but it won't be that hard.
LumberJack
Profile Blog Joined October 2002
United States3355 Posts
January 23 2008 10:09 GMT
#32
Sounds like you guys would have fun with randomizers and LRS (linear recursive sequence) with bits~
Man fears the darkness, and so he scrapes away at the edges of it with fire.
gwho
Profile Blog Joined January 2008
United States632 Posts
February 19 2008 21:41 GMT
#33
haha is slithe doing this for our enjoyment, or is he a math/cs major that posts his homework problems when he gets them, and then harvests the answers the daybefore his hw is due? lol
Slithe
Profile Blog Joined February 2007
United States985 Posts
February 20 2008 23:29 GMT
#34
lol if these were my homework problems I'd fail the classes so hard
Prev 1 2 All
Please log in or register to reply.
Live Events Refresh
Next event in 14h 28m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
UpATreeSC 193
Railgan 69
BRAT_OK 69
MindelVK 8
StarCraft: Brood War
GuemChi 3694
Larva 419
HiyA 387
Hyuk 142
Movie 106
Sexy 93
firebathero 87
Backho 48
Shine 25
Bale 23
[ Show more ]
Rock 16
Counter-Strike
pashabiceps1620
byalli532
Heroes of the Storm
Liquid`Hasu337
Other Games
Grubby2670
FrodaN1473
ceh9591
mouzStarbuck484
C9.Mang0141
QueenE75
elazer72
RotterdaM62
Trikslyr41
Organizations
Other Games
BasetradeTV309
Dota 2
PGL Dota 2 - Main Stream83
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 22 non-featured ]
StarCraft 2
• musti20045 111
• Shameless 49
• Adnapsc2 19
• Migwel
• sooper7s
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• HerbMon 27
• 80smullet 12
• Azhi_Dahaki9
• FirePhoenix6
• Michael_bg 2
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• Nemesis2128
• TFBlade953
Other Games
• imaqtpie772
• Shiphtur181
Upcoming Events
Replay Cast
14h 28m
Escore
15h 28m
INu's Battles
16h 28m
Classic vs ByuN
SHIN vs ByuN
OSC
18h 28m
Big Brain Bouts
21h 28m
Replay Cast
1d 5h
Replay Cast
1d 14h
RSL Revival
1d 15h
Classic vs GgMaChine
Rogue vs Maru
WardiTV Invitational
1d 16h
IPSL
1d 21h
Ret vs Art_Of_Turtle
Radley vs TBD
[ Show More ]
BSL
2 days
Replay Cast
2 days
RSL Revival
2 days
herO vs TriGGeR
NightMare vs Solar
uThermal 2v2 Circuit
2 days
BSL
3 days
IPSL
3 days
eOnzErG vs TBD
G5 vs Nesh
Patches Events
3 days
Replay Cast
3 days
Wardi Open
3 days
Afreeca Starleague
3 days
Jaedong vs Light
Monday Night Weeklies
3 days
Replay Cast
4 days
Sparkling Tuna Cup
4 days
Afreeca Starleague
4 days
Snow vs Flash
WardiTV Invitational
4 days
GSL
5 days
Classic vs Cure
Maru vs Rogue
GSL
6 days
SHIN vs Zoun
ByuN vs herO
Liquipedia Results

Completed

Proleague 2026-04-29
WardiTV TLMC #16
Nations Cup 2026

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
StarCraft2 Community Team League 2026 Spring
2026 GSL S1
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026

Upcoming

Escore Tournament S2: W5
KK 2v2 League Season 1
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
RSL Revival: Season 5
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 2026
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.