Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
cs-312:hw15 [2014/12/31 16:03]
ringger created
cs-312:hw15 [2015/02/21 11:45] (current)
ringger [Question 1]
Line 11: Line 11:
  
 Consider the table below for making change using dynamic programming. ​ Use the given denominations,​ and complete the empty cells on the right in order to calculate the optimal way of making change for 10 (units). Consider the table below for making change using dynamic programming. ​ Use the given denominations,​ and complete the empty cells on the right in order to calculate the optimal way of making change for 10 (units).
- +{| style="​border-collapse: collapse; text-align: center;"​
-<​table ​border=1 cellspacing=0 cellpadding=0>​+
   <tr>   <tr>
-    <td width=76 ​valign=top><​p><​b>​Amount:</​b></​p></​td>​ +    <td width=76 ​style="​border:​ 1px solid black;"​><​p><​b>​Amount:</​b></​p></​td>​ 
-    <td width=38 ​valign=top><​p><​b>​0</​b></​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p><​b>​0</​b></​p></​td>​ 
-    <td width=38 ​valign=top><​p><​b>​1</​b></​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p><​b>​1</​b></​p></​td>​ 
-    <td width=38 ​valign=top><​p><​b>​2</​b></​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p><​b>​2</​b></​p></​td>​ 
-    <td width=38 ​valign=top><​p><​b>​3</​b></​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p><​b>​3</​b></​p></​td>​ 
-    <td width=38 ​valign=top><​p><​b>​4</​b></​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p><​b>​4</​b></​p></​td>​ 
-    <td width=38 ​valign=top><​p><​b>​5</​b></​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p><​b>​5</​b></​p></​td>​ 
-    <td width=38 ​valign=top><​p><​b>​6</​b></​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p><​b>​6</​b></​p></​td>​ 
-    <td width=38 ​valign=top><​p><​b>​7</​b></​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p><​b>​7</​b></​p></​td>​ 
-    <td width=38 ​valign=top><​p><​b>​8</​b></​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p><​b>​8</​b></​p></​td>​ 
-    <td width=38 ​valign=top><​p><​b>​9</​b></​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p><​b>​9</​b></​p></​td>​ 
-    <td width=38 ​valign=top><​p><​b>​10</​b></​p></​td>​+    <td width=38 ​style="​border:​ 1px solid black;"​><​p><​b>​10</​b></​p></​td>​
   </tr>   </tr>
   <tr>   <tr>
-    <td width=76 ​valign=top><​p><​b>​d<​sub>​1</​sub>​=1</​b></​p></​td>​ +    <td width=76 ​style="​border:​ 1px solid black;"​><​p><​b>​d<​sub>​1</​sub>​=1</​b></​p></​td>​ 
-    <td width=38 ​valign=top><​p>​0</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​0</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​1</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​1</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​2</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​2</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​3</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​3</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​4</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​4</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​5</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​5</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​6</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​6</​p></​td>​ 
-    <td width=38 ​valign=top>&​nbsp;</​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​>&​nbsp;</​td>​ 
-    <td width=38 ​valign=top>&​nbsp;</​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​>&​nbsp;</​td>​ 
-    <td width=38 ​valign=top>&​nbsp;</​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​>&​nbsp;</​td>​ 
-    <td width=38 ​valign=top>&​nbsp;</​td>​+    <td width=38 ​style="​border:​ 1px solid black;"​>&​nbsp;</​td>​
   </tr>   </tr>
   <tr>   <tr>
-    <td width=76 ​valign=top><​p><​b>​d<​sub>​2</​sub>​=4</​b></​p></​td>​ +    <td width=76 ​style="​border:​ 1px solid black;"​><​p><​b>​d<​sub>​2</​sub>​=4</​b></​p></​td>​ 
-    <td width=38 ​valign=top><​p>​0</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​0</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​1</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​1</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​2</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​2</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​3</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​3</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​1</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​1</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​2</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​2</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​3</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​3</​p></​td>​ 
-    <td width=38 ​valign=top>&​nbsp;</​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​>&​nbsp;</​td>​ 
-    <td width=38 ​valign=top>&​nbsp;</​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​>&​nbsp;</​td>​ 
-    <td width=38 ​valign=top>&​nbsp;</​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​>&​nbsp;</​td>​ 
-    <td width=38 ​valign=top>&​nbsp;</​td>​+    <td width=38 ​style="​border:​ 1px solid black;"​>&​nbsp;</​td>​
   </tr>   </tr>
   <tr>   <tr>
-    <td width=76 ​valign=top><​p><​b>​d<​sub>​3</​sub>​=6</​b></​p></​td>​ +    <td width=76 ​style="​border:​ 1px solid black;"​><​p><​b>​d<​sub>​3</​sub>​=6</​b></​p></​td>​ 
-    <td width=38 ​valign=top><​p>​0</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​0</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​1</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​1</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​2</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​2</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​3</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​3</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​1</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​1</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​2</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​2</​p></​td>​ 
-    <td width=38 ​valign=top><​p>​1</​p></​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​><​p>​1</​p></​td>​ 
-    <td width=38 ​valign=top>&​nbsp;</​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​>&​nbsp;</​td>​ 
-    <td width=38 ​valign=top>&​nbsp;</​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​>&​nbsp;</​td>​ 
-    <td width=38 ​valign=top>&​nbsp;</​td>​ +    <td width=38 ​style="​border:​ 1px solid black;"​>&​nbsp;</​td>​ 
-    <td width=38 ​valign=top>&​nbsp;</​td>​+    <td width=38 ​style="​border:​ 1px solid black;"​>&​nbsp;</​td>​
   </tr>   </tr>
-</​table>​+|}
  
 === Question 2 === === Question 2 ===
cs-312/hw15.1420066994.txt.gz · Last modified: 2014/12/31 16:03 by ringger
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0