• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 11:00
CEST 17:00
KST 00:00
  • 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
[ASL21] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy18ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book20
Community News
Weekly Cups (May 30-Apr 5): herO, Clem, SHIN win0[BSL22] RO32 Group Stage3Weekly Cups (March 23-29): herO takes triple6Aligulac acquired by REPLAYMAN.com/Stego Research8Weekly Cups (March 16-22): herO doubles, Cure surprises3
StarCraft 2
General
Weekly Cups (May 30-Apr 5): herO, Clem, SHIN win Rongyi Cup S3 - Preview & Info Team Liquid Map Contest #22 - Presented by Monster Energy Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool What mix of new & old maps do you want in the next ladder pool? (SC2)
Tourneys
GSL CK - monthly team event Sparkling Tuna Cup - Weekly Open Tournament RSL Season 4 announced for March-April StarCraft Evolution League (SC Evo Biweekly) WardiTV Mondays
Strategy
Custom Maps
[M] (2) Frigid Storage Publishing has been re-enabled! [Feb 24th 2026]
External Content
The PondCast: SC2 News & Results Mutation # 520 Moving Fees Mutation # 519 Inner Power Mutation # 518 Radiation Zone
Brood War
General
ASL21 General Discussion Pros React To: JaeDong vs Queen [BSL22] RO32 Group Stage so ive been playing broodwar for a week straight. Gypsy to Korea
Tourneys
[Megathread] Daily Proleagues [ASL21] Ro24 Group F Escore Tournament StarCraft Season 2 [ASL21] Ro24 Group E
Strategy
What's the deal with APM & what's its true value Fighting Spirit mining rates Simple Questions, Simple Answers
Other Games
General Games
Stormgate/Frost Giant Megathread Starcraft Tabletop Miniature Game Nintendo Switch Thread General RTS Discussion Thread Darkest Dungeon
Dota 2
The Story of Wings Gaming Official 'what is Dota anymore' discussion
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
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread The Chess Thread Russo-Ukrainian War Thread NASA and the Private Sector Things Aren’t Peaceful in Palestine
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion Cricket [SPORT] Tokyo Olympics 2021 Thread General nutrition recommendations
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Loot Boxes—Emotions, And Why…
TrAiDoS
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
FS++
Kraekkling
ASL S21 English Commentary…
namkraft
Electronics
mantequilla
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1624 users

SC2 beta key contest

Blogs > forti
Post a Reply
forti
Profile Blog Joined April 2010
Singapore9 Posts
Last Edited: 2010-05-04 16:13:12
May 04 2010 15:42 GMT
#1
CONTEST OVER
vesperia won it!

Hello everyone, I got my beta key off one of these contests on TL and recently got my friend invites. I figured I should give it back to TL

The contest will be similar to the one I had to solve (mathematical) and you can either PM me or post in this thread the solution. First person (by time) to give me an acceptable solution will receive the key!

The question is:

Show that determining whether a directed graph G with vertice set V and edge set E contains a universal sink - a vertex with in-degree |V| -1 and out-degree 0 - can be determined in time O(V ), given an adjacency matrix for G.

You will require some basic graph theory and algorithm knowledge to solve this question

edit: Your answer just needs to describe a method/algorithm to obtain the answer and explain why it works, no actual code needed


Here are some useful links

+ Show Spoiler +

http://en.wikipedia.org/wiki/Adjacency_matrix
http://en.wikipedia.org/wiki/Graph_(mathematics)
http://en.wikipedia.org/wiki/Directed_graph#Indegree_and_outdegree
http://en.wikipedia.org/wiki/Asymptotic_upper_bound


Terranlisk
Profile Blog Joined February 2007
Singapore1404 Posts
May 04 2010 15:48 GMT
#2
damnit maths
aka myheronoob
Scorch
Profile Blog Joined March 2008
Austria3371 Posts
May 04 2010 15:51 GMT
#3
Do you mean O(E) or really O(V)?
forti
Profile Blog Joined April 2010
Singapore9 Posts
May 04 2010 15:54 GMT
#4
O(V), O(E) is too easy ^^
Vesperia
Profile Joined April 2010
Canada30 Posts
May 04 2010 16:01 GMT
#5
Is this it?

Let Vij be an adjacency matrix (containing integers 0 and 1)
int hold = 0; // first vertex with vertices number 0..n-1
for (int i = 1; i < n; i++) {
if (V[hold][i] == 1) // hold not a sink
hold = i; //make vertex i the new candidate
//else vertex i does not have in-degree |V| -1 and hold still a sink candidate
i++;
}
// check to see if candidate is a universal sink – it is the only possibility
boolean flag = true;
for (int j = 0; j < n; j++) {
if (j != hold && (V[j][hold] == 0 || V[hold][j] == 1) {
flag == false;
break;
}
}
if (flag)
System.out.println(“Vertex “, hold, “ is universal sink”);
else
System.out.println(“Graph contains no universal sink.”);
//both for-loops execute in O(|V|)
bITt.mAN
Profile Blog Joined March 2009
Switzerland3693 Posts
May 04 2010 16:06 GMT
#6
Damm, why couldn't it be something simpler
BW4LYF . . . . . . PM me, I LOVE PMs. . . . . . Long live "NaDa's Body" . . . . . . Fantasy | Bisu/Best | Jaedong . . . . .
forti
Profile Blog Joined April 2010
Singapore9 Posts
May 04 2010 16:12 GMT
#7
On May 05 2010 01:01 Vesperia wrote:
Is this it?

Let Vij be an adjacency matrix (containing integers 0 and 1)
int hold = 0; // first vertex with vertices number 0..n-1
for (int i = 1; i < n; i++) {
if (V[hold][i] == 1) // hold not a sink
hold = i; //make vertex i the new candidate
//else vertex i does not have in-degree |V| -1 and hold still a sink candidate
i++;
}
// check to see if candidate is a universal sink – it is the only possibility
boolean flag = true;
for (int j = 0; j < n; j++) {
if (j != hold && (V[j][hold] == 0 || V[hold][j] == 1) {
flag == false;
break;
}
}
if (flag)
System.out.println(“Vertex “, hold, “ is universal sink”);
else
System.out.println(“Graph contains no universal sink.”);
//both for-loops execute in O(|V|)


yup that's the solution i had in mind ^^ i'll PM you the key
Vesperia
Profile Joined April 2010
Canada30 Posts
May 04 2010 16:15 GMT
#8
YESSSSS! I finally got one!

Thanks so much forti!!!
forti
Profile Blog Joined April 2010
Singapore9 Posts
May 04 2010 16:33 GMT
#9
btw

for (int i = 1; i < n; i++) {
if (V[hold][i] == 1) // hold not a sink
hold = i; //make vertex i the new candidate
//else vertex i does not have in-degree |V| -1 and hold still a sink candidate
i++;
}

the 2nd i++ is wrong but the general method is correct ^^
yh8c4
Profile Blog Joined July 2009
108 Posts
May 04 2010 18:27 GMT
#10
nice to see that the key i gave to you spawned to another user
Please log in or register to reply.
Live Events Refresh
Next event in 9h
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
LamboSC2 320
Hui .298
trigger 122
StarCraft: Brood War
Calm 4569
Bisu 2825
Horang2 2570
Jaedong 2312
EffOrt 754
Shuttle 694
Soma 480
Larva 409
Stork 372
Aegong 307
[ Show more ]
Light 296
Snow 293
Mini 247
Soulkey 217
ZerO 215
ggaemo 197
Hyuk 188
Rush 156
Sea.KH 84
JYJ 76
hero 64
[sc1f]eonzerg 53
Sharp 51
Backho 48
Shinee 37
sSak 35
Movie 25
Hm[arnc] 24
910 22
Terrorterran 19
ajuk12(nOOB) 16
soO 15
Sacsri 14
Dota 2
Gorgc4951
qojqva2532
Counter-Strike
fl0m2088
oskar94
Other Games
singsing2487
Liquid`RaSZi1194
B2W.Neo1014
hiko626
Lowko367
crisheroes289
XcaliburYe133
XaKoH 110
ArmadaUGS102
QueenE86
Mew2King47
ZerO(Twitch)11
Trikslyr10
Organizations
Other Games
BasetradeTV547
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV628
• lizZardDota248
League of Legends
• Nemesis3263
Upcoming Events
PiGosaur Cup
9h
Replay Cast
18h
Kung Fu Cup
20h
Replay Cast
1d 9h
The PondCast
1d 19h
CranKy Ducklings
2 days
WardiTV Team League
2 days
Replay Cast
3 days
CranKy Ducklings
3 days
WardiTV Team League
3 days
[ Show More ]
uThermal 2v2 Circuit
4 days
BSL
4 days
Sparkling Tuna Cup
4 days
WardiTV Team League
4 days
BSL
5 days
Replay Cast
5 days
Replay Cast
5 days
Wardi Open
5 days
Liquipedia Results

Completed

CSL Elite League 2026
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
StarCraft2 Community Team League 2026 Spring
Nations Cup 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
IEM Kraków 2026
BLAST Bounty Winter 2026

Upcoming

Escore Tournament S2: W2
IPSL Spring 2026
Escore Tournament S2: W3
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
RSL Revival: Season 5
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 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.