The Beastie Forums
Where the Beastie Websites meet the World!

Home » The CS201 Forums » Programming Assignment 3 » Test 3 Dropbox Binomial Test Problems (What does this do?)
Test 3 Dropbox Binomial Test Problems[message #8216] Fri, 14 April 2017 11:42 Go to next message
shmartin1 is currently offline shmartin1
Understands Conditionals
Messages:4
Registered:January 2017
Location: 127.0.0.1
I'm getting some errors in testing my Binomial Heap with integers and I'm confused what some of this means. Here's where the error is showing up.
Quote:

When deleting, the first number is the value to be deleted.
The second (in parentheses) is the decreased key value.

DELETING: 49 (-1) 8 (-2) 29 (-3) 20 (-4) 17 (-5) 13 (-6) 39 (-7)

binomial heap size is 41
----
0: 37-0
----
0: -6-3
1: -2-0(-6-3) 12-1(-6-3) 11-2(-6-3)
2: 35-0(12-1) 46-0(11-2) 27-1(11-2)
3: 28-0(27-1)
----
0: 1-5
1: 26-0(1-5) 21-1(1-5) 19-2(1-5) 3-3(1-5) 2-4(1-5)
2: 33-0(21-1) 38-0(19-2) 25-1(19-2) 44-0(3-3) 36-1(3-3) 14-2(3-3) 42-0(2-4) 34-1(2-4) 6-2(2-4) 4-3(2-4)
3: 41-0(25-1) 48-0(36-1) 43-0(14-2) 23-1(14-2) 45-0(34-1) 31-0(6-2) 16-1(6-2) 7-0(4-3) 18-1(4-3) 9-2(4-3)
4: 24-0(23-1) 40-0(16-1) 22-0(18-1) 10-0(9-2) 15-1(9-2)
5: 32-0(15-1)
----

Obviously negative integers aren't part of the solution. I have no clue what it means by the when deleting...

Any pointers?



Swear it's not my fault.

Report message to a moderator

Re: Test 3 Dropbox Binomial Test Problems[message #8217 is a reply to message #8216] Fri, 14 April 2017 11:58 Go to previous messageGo to next message
jarobinson3 is currently offline jarobinson3
Hacker
Messages:102
Registered:August 2016
Location: SEC 3429
I am not sure what you are asking. What is the error? I am not really sure what I am looking at.


Please study.

Report message to a moderator

Re: Test 3 Dropbox Binomial Test Problems[message #8218 is a reply to message #8217] Fri, 14 April 2017 12:06 Go to previous messageGo to next message
shmartin1 is currently offline shmartin1
Understands Conditionals
Messages:4
Registered:January 2017
Location: 127.0.0.1
So it says, when deleting the first number is the value to be deleted, and then the value in the parentheses is the decreased key value. I'm trying to figure out what functions are being called in order to qualify a delete. Is it decreaseBinomialKey and then extractBinomial?


Swear it's not my fault.

Report message to a moderator

Re: Test 3 Dropbox Binomial Test Problems[message #8219 is a reply to message #8218] Fri, 14 April 2017 14:05 Go to previous messageGo to next message
jarobinson3 is currently offline jarobinson3
Hacker
Messages:102
Registered:August 2016
Location: SEC 3429
It sounds like he calls decreaseBinomialKey with that value, then extractBinomial.


Please study.

Report message to a moderator

Re: Test 3 Dropbox Binomial Test Problems[message #8220 is a reply to message #8219] Fri, 14 April 2017 14:19 Go to previous message
jarobinson3 is currently offline jarobinson3
Hacker
Messages:102
Registered:August 2016
Location: SEC 3429
I talked to Dr. Lusth and he said you can just insert all the integers in the order they are listed before the removals are called. Then you need to call decrease key for the integers listed to the values listed in parenthesis.



Please study.

Report message to a moderator

Previous Topic: NewInteger Problem
Next Topic: about the test#18
Goto Forum:
  


Current Time: Sun Apr 30 21:32:02 CDT 2017

Total time taken to generate the page: 0.00404 seconds