Author: Stan Eisenstat
Subject: Re: [Cs223] confusion about backtracking
Date: Thursday, 13 Feb 2020, 10:11:28
> Message Posted By: Unknown
>
> I am confused about the process of backtracking - like the knight's
> problem, are we guaranteed to always start with the knight in the same
> spot or the same number in the same bin? Say you are running opt on items
> 3 2 and 1 with a binsize of 4. You start with running all solutions with 3
> in bin 0, which include all solution with 2 in bin 1 and with 1 in bin 1.
> After having removed all other items from bins, do you place 3 in bin 1,
> and test all solutions with 2 in bin 0 and 1 in bin 0, then do the same
> with 3 in bin 3? Afterwards, do you then start testing all solutions with
> 2 in bin 0, and finally with 1 in bin 0? That seems like it will
> unnecessarily repeat a lot of solutions. Is it sufficient to solely test
> all solutions with 3 in bin 0, or 3 in each position?
To see what backtracking does for the example above,
run the command
% /c/cs223/Hwk2/BinpackX 4 3 2 1 -optABCDE
(where -optABCDE disables all of the backtracking
heuristics).
--Stan-
PREV
INDEX
NEXT