<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Programming Challenges: Australian Voting</title>
	<atom:link href="http://inspirated.com/2008/07/11/programming-challenges-australian-voting/feed" rel="self" type="application/rss+xml" />
	<link>http://inspirated.com/2008/07/11/programming-challenges-australian-voting</link>
	<description>krkhan&#039;s blog</description>
	<lastBuildDate>Wed, 15 May 2013 04:36:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Matteo Landi</title>
		<link>http://inspirated.com/2008/07/11/programming-challenges-australian-voting/comment-page-1#comment-37679</link>
		<dc:creator>Matteo Landi</dc:creator>
		<pubDate>Wed, 17 Nov 2010 20:37:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.inspirated.com/wordpress/?p=90#comment-37679</guid>
		<description><![CDATA[I think I&#039;ve found the bug.
I was initializing the `min&#039; variable to a wrong value(number of candidates minus one instead of number of ballots minus minus one): this makes the program enter in an infinite loop, and that&#039;s why I got that LTE message.
As soon as Programmin-Challenges comes back on-line, I&#039;ll try the fixed solution.

Regards,
Matteo]]></description>
		<content:encoded><![CDATA[<p>I think I&#8217;ve found the bug.<br />
I was initializing the `min&#8217; variable to a wrong value(number of candidates minus one instead of number of ballots minus minus one): this makes the program enter in an infinite loop, and that&#8217;s why I got that LTE message.<br />
As soon as Programmin-Challenges comes back on-line, I&#8217;ll try the fixed solution.</p>
<p>Regards,<br />
Matteo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matteo Landi</title>
		<link>http://inspirated.com/2008/07/11/programming-challenges-australian-voting/comment-page-1#comment-37621</link>
		<dc:creator>Matteo Landi</dc:creator>
		<pubDate>Sun, 14 Nov 2010 21:18:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.inspirated.com/wordpress/?p=90#comment-37621</guid>
		<description><![CDATA[Hi again,
I forgot to post a link to the implementation of the algorithm, and one to both the input and the output I use to test things.

* code: http://pastebin.com/rhqYs1uZ
* input: http://pastebin.com/UU3Af4hh
* output: http://pastebin.com/q3hg5sD1

Regards,
Matteo]]></description>
		<content:encoded><![CDATA[<p>Hi again,<br />
I forgot to post a link to the implementation of the algorithm, and one to both the input and the output I use to test things.</p>
<p>* code: <a href="http://pastebin.com/rhqYs1uZ" rel="nofollow">http://pastebin.com/rhqYs1uZ</a><br />
* input: <a href="http://pastebin.com/UU3Af4hh" rel="nofollow">http://pastebin.com/UU3Af4hh</a><br />
* output: <a href="http://pastebin.com/q3hg5sD1" rel="nofollow">http://pastebin.com/q3hg5sD1</a></p>
<p>Regards,<br />
Matteo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matteo Landi</title>
		<link>http://inspirated.com/2008/07/11/programming-challenges-australian-voting/comment-page-1#comment-37620</link>
		<dc:creator>Matteo Landi</dc:creator>
		<pubDate>Sun, 14 Nov 2010 21:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.inspirated.com/wordpress/?p=90#comment-37620</guid>
		<description><![CDATA[Hi krkhan,
I&#039;m stuck with the Time Limit Exceeded, but I don&#039;t understand if it&#039;s a matter of algorithm efficiency, or my program falls inside an infinite loop.
Here are the steps of my solution:
1 count all the votes per candidate
2 find min/max number of votes per candidate
3a if min == max then all the remaining candidates have tied, and they are all winners. Then exit.
3b else if max/tot &gt; 50 / 10 we have a single winner. Then exit.
3c find all the ballots starting with a losing candidate and shift the ballot until the head candidate is still in race for winning
4 come back to #1
This is the general idea (obviously we can avoid to count the votes at each iteration and also to shift the ballots).

What do you think about this? Do you see any point of failure?
Thank you so much.

Regards,
Matteo]]></description>
		<content:encoded><![CDATA[<p>Hi krkhan,<br />
I&#8217;m stuck with the Time Limit Exceeded, but I don&#8217;t understand if it&#8217;s a matter of algorithm efficiency, or my program falls inside an infinite loop.<br />
Here are the steps of my solution:<br />
1 count all the votes per candidate<br />
2 find min/max number of votes per candidate<br />
3a if min == max then all the remaining candidates have tied, and they are all winners. Then exit.<br />
3b else if max/tot &gt; 50 / 10 we have a single winner. Then exit.<br />
3c find all the ballots starting with a losing candidate and shift the ballot until the head candidate is still in race for winning<br />
4 come back to #1<br />
This is the general idea (obviously we can avoid to count the votes at each iteration and also to shift the ballots).</p>
<p>What do you think about this? Do you see any point of failure?<br />
Thank you so much.</p>
<p>Regards,<br />
Matteo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dymnallorymn</title>
		<link>http://inspirated.com/2008/07/11/programming-challenges-australian-voting/comment-page-1#comment-16370</link>
		<dc:creator>Dymnallorymn</dc:creator>
		<pubDate>Sun, 03 Aug 2008 11:22:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.inspirated.com/wordpress/?p=90#comment-16370</guid>
		<description><![CDATA[Very nice!!]]></description>
		<content:encoded><![CDATA[<p>Very nice!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
