(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 2361, 77] NotebookOptionsPosition[ 1993, 60] NotebookOutlinePosition[ 2373, 76] CellTagsIndexPosition[ 2330, 73] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["\<\ 9/24/08: Using the values a = 4 and b = 5, this file lists all combinations \ of the form i*a + j*b, for 0 \[LessEqual] i, j \[LessEqual] 4. It's used to \ investigate the 2-stamp Postage Stamp Problem.\ \>", "Subsubsection", CellChangeTimes->{{3.431256173714568*^9, 3.431256269757755*^9}, { 3.4313700184599185`*^9, 3.4313700380074186`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"a", "=", "4"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"b", "=", "5"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"S", "=", RowBox[{"{", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"i", "=", "0"}], ",", " ", RowBox[{"i", "\[LessEqual]", "4"}], ",", " ", RowBox[{"i", "++"}], ",", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "0"}], ",", " ", RowBox[{"j", "\[LessEqual]", "4"}], ",", " ", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{"S", " ", "=", " ", RowBox[{"S", "\[Union]", RowBox[{"{", RowBox[{ RowBox[{"i", " ", "a"}], " ", "+", " ", RowBox[{"j", " ", "b"}]}], "}"}]}]}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", "S", "]"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.4312560349542713`*^9, 3.4312561499342313`*^9}}] }, Open ]] }, ScreenStyleEnvironment->"Presentation", WindowSize->{611, 538}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (April 20, 2007)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[590, 23, 354, 6, 94, "Subsubsection"], Cell[947, 31, 1030, 26, 244, "Input"] }, Open ]] } ] *) (* End of internal cache information *)