Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| courses:cs211:winter2012:journals:jeanpaul:chaptter2section3 [2012/01/23 23:49] – [Implementation of the algorithm] mugabej | courses:cs211:winter2012:journals:jeanpaul:chaptter2section3 [2012/01/23 23:56] (current) – mugabej | ||
|---|---|---|---|
| Line 69: | Line 69: | ||
| * **Ranking**[// | * **Ranking**[// | ||
| * Creating the array **Ranking** is O(// | * Creating the array **Ranking** is O(// | ||
| - | * To decide which of //m// or //m'// is preferred by //w//, we just compare the values **Ranking**[// | + | * To decide which of //m// or //m'// is preferred by //w//, we just compare the values **Ranking**[// |
| - | **Ranking**[// | + | |
| All of the data structures mentioned above help us implement the Gale-Shapley algorithm in O(// | All of the data structures mentioned above help us implement the Gale-Shapley algorithm in O(// | ||
| + | |||
| + | |||
| + | To be honest, I hadn't understood quite well how we can specify the woman //w// a man //m// will propose to, and do it in constant time,before I reread the section and get how we can work it out. The preference lists representation was a little bit trickier because I was thinking of a different way of implementing them, but I'm now convinced the method in the book is really efficient. | ||
| + | |||
| + | |||
| + | This section was really interesting, | ||
| + | |||
| + | |||
| + | |||
