<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5021776977741924692</id><updated>2011-04-21T16:44:29.703-07:00</updated><category term='scheme'/><category term='eopl'/><category term='bnn'/><category term='csharp'/><category term='flipper'/><category term='sloganizer'/><category term='topcoder'/><category term='javascript'/><category term='essentials of programming languages'/><category term='wu:riddles'/><category term='java'/><category term='python'/><category term='neural net'/><category term='L-99'/><category term='ninenty nine problems'/><category term='neural network'/><category term='html'/><category term='shiftsrt'/><category term='perl'/><category term='ann'/><category term='google gadget'/><category term='project'/><category term='riddle'/><title type='text'>Hef Does Homework</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://hefdoeshwk.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://hefdoeshwk.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>hef</name><uri>http://www.blogger.com/profile/03019967815360487543</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5021776977741924692.post-6025046038391501485</id><published>2008-08-13T18:13:00.000-07:00</published><updated>2008-08-13T18:26:34.870-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ninenty nine problems'/><category scheme='http://www.blogger.com/atom/ns#' term='L-99'/><category scheme='http://www.blogger.com/atom/ns#' term='scheme'/><title type='text'>L-99 - Lists</title><content type='html'>&lt;a href="http://www.ic.unicamp.br/%7Emeidanis/courses/mc336/2006s2/funcional/L-99_Ninety-Nine_Lisp_Problems.html"&gt;L-99: Ninety-Nine Lisp Problems&lt;/a&gt;--or as I like to call it, &lt;a href="http://www.google.com/search?q=i+got+99+problems+but+a+b+aint+one"&gt;I got 99 problems but a LISP ain't one&lt;/a&gt;--is a problem set designed to test prowess in Lisp (or Scheme, in my case), as well as algorithmic thinking.  The problems are divided into subsets, each subset having a particular focus: lists, arithmetic, graphs, etc.&lt;br /&gt;&lt;br /&gt;The first subset, comprised of problems 1 through 28, is the list-focused subset.  The problems start easy; but, difficulty increases from there.  Things get interesting around Problems 26 and 27, which deal with combinatoric set generation.  I found Problem 27, in particular, to be challenging; and, it required a fair bit of thought to reach my current solution.  The last two problems, Problems 28A and 28B, deal with sorting.  I also found Problem 28B to be challenging; but, it was easier than Problem 27 to wrap my mind around.  Perhaps the difference there is due simply to algorithm familiarity--which is good, when learning new things is the end game.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/99problems/scheme/lists.scm"&gt;Solutions&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5021776977741924692-6025046038391501485?l=hefdoeshwk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hefdoeshwk.blogspot.com/feeds/6025046038391501485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5021776977741924692&amp;postID=6025046038391501485' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/6025046038391501485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/6025046038391501485'/><link rel='alternate' type='text/html' href='http://hefdoeshwk.blogspot.com/2008/08/l-99-lists.html' title='L-99 - Lists'/><author><name>hef</name><uri>http://www.blogger.com/profile/03019967815360487543</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5021776977741924692.post-1865603271775434951</id><published>2008-07-27T17:45:00.000-07:00</published><updated>2008-07-29T05:46:28.374-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eopl'/><category scheme='http://www.blogger.com/atom/ns#' term='essentials of programming languages'/><category scheme='http://www.blogger.com/atom/ns#' term='scheme'/><title type='text'>EoPL - Ch 1 - Exs 19-26</title><content type='html'>Exercises 19 through 26 in Chapter 1 of &lt;a href="http://books.google.com/books?id=GtPoyremy4EC"&gt;Essentials of Programming Languages&lt;/a&gt; begin delving into parsing concepts.  In particular, they explore the concepts of free and bound variables in lambda expressions.&lt;br /&gt;&lt;br /&gt;In the book, &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/figure1.1.scm"&gt;Figure 1.1&lt;/a&gt; provides an implementation of the definition of occurring free and occuring bound (given by Definition 1.3.3).  All the exercises are based on this definition; and, Exercises 22 through 26 focus on extending it.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Ex. 19&lt;/i&gt;&lt;br /&gt;Define a function &lt;code&gt;free-vars&lt;/code&gt; that takes a list structure representing a lambda calculus expression (as referenced by Definition 1.3.3), and returns a set of all variables that occur free within the expression.  Similarly, define a function &lt;code&gt;bound-vars&lt;/code&gt; that returns a set of all variables that occur bound in a given expression. &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.19.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Ex. 20&lt;/i&gt;&lt;br /&gt;Give an example of a lambda calculus expression in which the same variable occurs free, but also has a value independent of its free occurence.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.20.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Ex. 21&lt;/i&gt;&lt;br /&gt;Give an example of a lambda calculus expression in which the same variable occurs both free and bound.  Solution: The solution for Exercise 20 also suffices for this exercise.  In fact, I do not see much difference between the problems.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Ex. 22&lt;/i&gt;&lt;br /&gt;Modify the functions &lt;code&gt;occurs-free?&lt;/code&gt; and &lt;code&gt;occurs-bound?&lt;/code&gt; (see &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/figure1.1.scm"&gt;Figure 1.1&lt;/a&gt;) to allow lambda abstractions and applications with any number of parameters.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.22.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Ex. 23&lt;/i&gt;&lt;br /&gt;Modify the functions &lt;code&gt;occurs-free?&lt;/code&gt; and &lt;code&gt;occurs-bound?&lt;/code&gt; (see &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/figure1.1.scm"&gt;Figure 1.1&lt;/a&gt;) to include &lt;code&gt;if&lt;/code&gt; expressions.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.23.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Ex. 24&lt;/i&gt;&lt;br /&gt;Modify the functions &lt;code&gt;occurs-free?&lt;/code&gt; and &lt;code&gt;occurs-bound?&lt;/code&gt; (see &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/figure1.1.scm"&gt;Figure 1.1&lt;/a&gt;) to include &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;let*&lt;/code&gt; expressions.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.24.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Ex. 25&lt;/i&gt;&lt;br /&gt;Modify the functions &lt;code&gt;occurs-free?&lt;/code&gt; and &lt;code&gt;occurs-bound?&lt;/code&gt; (see &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/figure1.1.scm"&gt;Figure 1.1&lt;/a&gt;) to include expressions of the form &lt;code&gt;(quote &lt;/code&gt;[datum]&lt;code&gt;)&lt;/code&gt;.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.25.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Ex. 26&lt;/i&gt;&lt;br /&gt;Modify the functions &lt;code&gt;occurs-free?&lt;/code&gt; and &lt;code&gt;occurs-bound?&lt;/code&gt; (see &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/figure1.1.scm"&gt;Figure 1.1&lt;/a&gt;) to include &lt;code&gt;set!&lt;/code&gt; assignment expressions.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.26.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The inclusion of &lt;code&gt;set!&lt;/code&gt; expressions in Exercise 26 is somewhat ambiguous: if a variable that was not in scope (i.e. free) is &lt;code&gt;set!&lt;/code&gt;-ed does it become a bound variable?  The actual Scheme interpreter only allows in-scope (i.e. bound) variables to be &lt;code&gt;set!&lt;/code&gt;-ed, therefore &lt;code&gt;set!&lt;/code&gt; never makes a bound variable from a free one.  With that in mind, I chose to make my solution disregard appearance as the first operand in a &lt;code&gt;set!&lt;/code&gt; statement as criteria for a bound variable.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5021776977741924692-1865603271775434951?l=hefdoeshwk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hefdoeshwk.blogspot.com/feeds/1865603271775434951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5021776977741924692&amp;postID=1865603271775434951' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/1865603271775434951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/1865603271775434951'/><link rel='alternate' type='text/html' href='http://hefdoeshwk.blogspot.com/2008/07/eopl-ch-1-exs-19-26.html' title='EoPL - Ch 1 - Exs 19-26'/><author><name>hef</name><uri>http://www.blogger.com/profile/03019967815360487543</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5021776977741924692.post-7628883113115539321</id><published>2008-07-16T17:43:00.000-07:00</published><updated>2008-07-23T21:00:05.399-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='topcoder'/><category scheme='http://www.blogger.com/atom/ns#' term='csharp'/><title type='text'>TopCoder - SRM 145 - Div 2</title><content type='html'>The following problems are from Single Round Match No. 145, Division 2 of &lt;a href="http://www.topcoder.com/tc"&gt;TopCoder&lt;/a&gt;'s Algorithm Competition.  (Full problem specifications are copyright TopCoder; and, can be found in the TopCoder problem archives.)&lt;br /&gt;&lt;br /&gt;&lt;i&gt;250 Point Problem&lt;/i&gt;&lt;br /&gt;&lt;quote&gt;Write a method &lt;code&gt;count&lt;/code&gt; that, given a matrix and a set of fill values, returns the number of elements in the matrix that make up the fill value set.&lt;/quote&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/topcoder/Srm145/Div2/ImageDithering.cs"&gt;Solution.&lt;/a&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/topcoder/Srm145/Div2/ImageDitheringTest.cs"&gt;Unit Tests For Sample Data.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I found the original problem statement for this problem to be very ambiguous.  The actual context of the problem is &lt;a href="http://en.wikipedia.org/wiki/Dither#Digital_photography_and_image_processing"&gt;image dithering&lt;/a&gt;; the given matrix represents a colored display, and the set of fill values represents dithering colors.  The solution objective is to count the number of pixels in the display that are part of a dithered color.  The ambiguity is in how to treat a single pixel that is colored with one of the dithering colors, but is surrounded by pixels which are not colored by dithering colors.  The sample data for the problems hints that such a pixel should be counted, while my (very basic) understanding of image dithering suggests such a pixel should not be counted.  In the end, I designed my algorithm to do the latter.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;500 Point Problem&lt;/i&gt;&lt;br /&gt;&lt;quote&gt;Write a method &lt;code&gt;getPercentages&lt;/code&gt; that, given a time quantity in HH:MM:SS format, returns the number of times a whole percentage would be encountered if a timer were to count up and, each second, compute the ratio of elapsed time to total time.  This count of whole percentages should exclude 0% and 100%.&lt;/quote&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/topcoder/Srm145/Div2/ExerciseMachine.cs"&gt;Solution.&lt;/a&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/topcoder/Srm145/Div2/ExerciseMachineTest.cs"&gt;Unit Tests For Sample Data.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From a different perspective, this problem is actually asking how many pieces (minus one) a quantity can be divided into, with the stipulations that each piece must represent a whole percentage of the quantity, and that each piece must consist of a whole number of units.  Because of the first stipulation, the maximum number of pieces we are interested in is 100.  Thus, a simple, brute force solution which tests the two stipulations on 100 pieces, 99 pieces, 98 pieces, etc, works well.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;1100 Point Problem&lt;/i&gt;&lt;br /&gt;&lt;quote&gt;Write a method &lt;code&gt;motorUse&lt;/code&gt; which simulates a motorized vending machine and, when given list of purchases, returns the number of seconds the motor is active.&lt;/quote&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/topcoder/Srm145/Div2/VendingMachine.cs"&gt;Solution.&lt;/a&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/topcoder/Srm145/Div2/VendingMachineTest.cs"&gt;Unit Tests For Sample Data.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This problem was different, in the algorithmic sense, than other TopCoder problems I've seen.  The difficulty in it came mostly from having to adhere to the many details in the problem specification.  Consequently, the problem seemed more a software engineering puzzle; but, it was still a fun change of pace.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5021776977741924692-7628883113115539321?l=hefdoeshwk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hefdoeshwk.blogspot.com/feeds/7628883113115539321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5021776977741924692&amp;postID=7628883113115539321' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/7628883113115539321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/7628883113115539321'/><link rel='alternate' type='text/html' href='http://hefdoeshwk.blogspot.com/2008/07/topcoder-srm-145-div-2.html' title='TopCoder - SRM 145 - Div 2'/><author><name>hef</name><uri>http://www.blogger.com/profile/03019967815360487543</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5021776977741924692.post-8261762432441753880</id><published>2008-07-13T20:33:00.000-07:00</published><updated>2008-07-14T21:03:48.788-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='google gadget'/><category scheme='http://www.blogger.com/atom/ns#' term='sloganizer'/><category scheme='http://www.blogger.com/atom/ns#' term='project'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='flipper'/><title type='text'>Sloganizer &amp; Flipper</title><content type='html'>Sloganizer and Flipper are two &lt;a href="http://www.google.com/webmasters/gadgets/"&gt;Google Gadgets&lt;/a&gt; I created for fun.  They are both very simple; but they served as a nice introduction to the Google Gadget API.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/googlegadgets/sloganizer/sloganizer.xml"&gt;Sloganizer&lt;/a&gt; takes a word or phrase and injects it into a random marketing slogan, to (hopefully) hilarious effect.&lt;br /&gt;  &lt;iframe style="margin-left: 1em; margin-right: 1em;" src="http://29.gmodules.com/ig/ifr?mid=29&amp;amp;synd=trogedit&amp;amp;url=http%3A%2F%2Fhefdoeshwk.googlecode.com%2Fsvn%2Ftrunk%2Fgooglegadgets%2Fsloganizer%2Fsloganizer.xml&amp;amp;h=100&amp;amp;w=400" allowtransparency="true" class="igm" igsrc="http://www.google.com/ig/images/no_image/no_image_gadget_thm.png" frameborder="0" height="100" scrolling="no" width="400"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/googlegadgets/flipper/flipper.xml"&gt;Flipper&lt;/a&gt; takes a word or phrase and "flips" it horizontally and vertically, via visually approximate unicode characters.&lt;br /&gt;   &lt;iframe style="margin-left: 1em; margin-right: 1em;" src="http://229.gmodules.com/ig/ifr?mid=229&amp;amp;synd=trogedit&amp;amp;url=http%3A%2F%2Fhefdoeshwk.googlecode.com%2Fsvn%2Ftrunk%2Fgooglegadgets%2Fflipper%2Fflipper.xml&amp;amp;h=100&amp;amp;w=400" allowtransparency="true" scrolling="no" frameborder="0" class="igm" igsrc="http://www.google.com/ig/images/no_image/no_image_gadget_thm.png" height="100" width="400"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5021776977741924692-8261762432441753880?l=hefdoeshwk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hefdoeshwk.blogspot.com/feeds/8261762432441753880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5021776977741924692&amp;postID=8261762432441753880' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/8261762432441753880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/8261762432441753880'/><link rel='alternate' type='text/html' href='http://hefdoeshwk.blogspot.com/2008/07/sloganizer-flipper.html' title='Sloganizer &amp; Flipper'/><author><name>hef</name><uri>http://www.blogger.com/profile/03019967815360487543</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5021776977741924692.post-205293252021191990</id><published>2008-07-09T17:48:00.000-07:00</published><updated>2008-07-23T21:03:26.197-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eopl'/><category scheme='http://www.blogger.com/atom/ns#' term='essentials of programming languages'/><category scheme='http://www.blogger.com/atom/ns#' term='scheme'/><title type='text'>EoPL - Ch 1 - Ex 18</title><content type='html'>Exercise 18 in Chapter 1 of &lt;a href="http://books.google.com/books?id=GtPoyremy4EC"&gt;Essentials of Programming Languages&lt;/a&gt; is our last Scheme &lt;a href="http://www.blogger.com/2008/06/eopl-ch-1-ex-15.html"&gt;introductory&lt;/a&gt; &lt;a href="http://www.blogger.com/2008/06/eopl-ch-1-ex-16.html"&gt;programming&lt;/a&gt; &lt;a href="http://hefdoeshwk.blogspot.com/2008/06/eopl-ch-1-ex-17.html"&gt;exercise&lt;/a&gt;.  It broaches the topic of function composition.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Ex. 18, Pt. 1&lt;/i&gt;&lt;br /&gt;Define a function &lt;code&gt;compose : (f1 : 'b -&gt; 'c) * (f2 : a' -&gt; b') -&gt; 'c&lt;/code&gt; that returns the composition of the functions &lt;code&gt;f1&lt;/code&gt; and &lt;code&gt;f2&lt;/code&gt;, such that &lt;code&gt;((compose f g) x)&lt;/code&gt; is equivalent to &lt;code&gt;(f (g x))&lt;/code&gt;. &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.18.1.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Ex. 18, Pt. 2&lt;/i&gt;&lt;br /&gt;Define a function &lt;code&gt;car&amp;amp;cdr : (s : 'a) * (slist : ['a]) * (errvalue: 'b) -&gt; [_]&lt;/code&gt; that returns an expression which, when evaluated, produces a function in turn.  This expression should be comprised of &lt;code&gt;car&lt;/code&gt;, &lt;code&gt;cdr&lt;/code&gt;, and &lt;code&gt;compose&lt;/code&gt; (see Pt. 1) applications only.  The function generated by this expression, when given a list similar to &lt;code&gt;slist&lt;/code&gt;, should return the element in the given list that is at the same position as the first occurrence of &lt;code&gt;s&lt;/code&gt; in &lt;code&gt;slist&lt;/code&gt;.  If &lt;code&gt;slist&lt;/code&gt; does not contain an instance of &lt;code&gt;s&lt;/code&gt;, &lt;code&gt;car&amp;amp;cdr&lt;/code&gt; should return &lt;code&gt;errvalue&lt;/code&gt; instead of an expression.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.18.2.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Ex. 18, Pt. 3&lt;/i&gt;&lt;br /&gt;Define a function &lt;code&gt;car&amp;amp;cdr2 : (s : 'a) * (slist : ['a]) * (errvalue: 'b) -&gt; [_]&lt;/code&gt; that returns an expression which, when evaluated, produces a function in turn.  This expression should be comprised of &lt;code&gt;car&lt;/code&gt; and &lt;code&gt;cdr&lt;/code&gt; applications, and lambda expressions only.  The function generated by this expression, when given a list similar to &lt;code&gt;slist&lt;/code&gt;, should return the element in the given list that is at the same position as the first occurrence of &lt;code&gt;s&lt;/code&gt; in &lt;code&gt;slist&lt;/code&gt;.  If &lt;code&gt;slist&lt;/code&gt; does not contain an instance of &lt;code&gt;s&lt;/code&gt;, &lt;code&gt;car&amp;amp;cdr&lt;/code&gt;2 should return &lt;code&gt;errvalue&lt;/code&gt; instead of an expression.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.18.3.scm"&gt;Solution&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5021776977741924692-205293252021191990?l=hefdoeshwk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hefdoeshwk.blogspot.com/feeds/205293252021191990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5021776977741924692&amp;postID=205293252021191990' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/205293252021191990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/205293252021191990'/><link rel='alternate' type='text/html' href='http://hefdoeshwk.blogspot.com/2008/07/eopl-ch-1-ex-18.html' title='EoPL - Ch 1 - Ex 18'/><author><name>hef</name><uri>http://www.blogger.com/profile/03019967815360487543</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5021776977741924692.post-902665169903623240</id><published>2008-07-06T21:34:00.000-07:00</published><updated>2008-07-09T17:52:10.555-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='topcoder'/><category scheme='http://www.blogger.com/atom/ns#' term='csharp'/><title type='text'>TopCoder - SRM 144 - Div 2 - 1100 Pt</title><content type='html'>&lt;i&gt;From Single Round Match No. 144 of &lt;a href="http://www.topcoder.com/tc"&gt;TopCoder&lt;/a&gt;'s Algorithm Competition:&lt;/i&gt;&lt;br /&gt;&lt;quote&gt;Write a method &lt;code&gt;estimateTimeOut&lt;/code&gt; that, given an edge-weighted tree, returns the minimum cost to visit all nodes.  [Plus some backstory about a power outage, underground transformers, and a catacombic sewer.]&lt;/quote&gt;&lt;br /&gt;&lt;i&gt;(Full problem specification is copyright TopCoder; and, can be found in the TopCoder problem archives.)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/topcoder/Srm144/Div2/PowerOutage.cs"&gt;Solution.&lt;/a&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/topcoder/Srm144/Div2/PowerOutageTest.cs"&gt;Unit Tests For Sample Data.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This problem was used as the Division 2 1100-point problem.  It reminds me of certain &lt;a href="http://en.wikipedia.org/wiki/ACM_International_Collegiate_Programming_Contest"&gt;ACM-ICPC&lt;/a&gt; problems: mix two parts strong underlying data structure and algorithm with one part playful, semi-verbose problem description.&lt;br /&gt;&lt;br /&gt;The solution to the problem is to realize that each edge in the tree will need to be traversed twice (once to go to a node, and once to come back from it) in order to visit all nodes, &lt;i&gt;except&lt;/i&gt; for the edges on the path to the last visited node.  Therefore, the minimum cost can be calculated by finding the most expensive node to reach (from the tree's root), and subtracting the cost reaching that node from twice the sum of all edge weights.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5021776977741924692-902665169903623240?l=hefdoeshwk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hefdoeshwk.blogspot.com/feeds/902665169903623240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5021776977741924692&amp;postID=902665169903623240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/902665169903623240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/902665169903623240'/><link rel='alternate' type='text/html' href='http://hefdoeshwk.blogspot.com/2008/07/topcoder-srm-144-div-2-1100-pt.html' title='TopCoder - SRM 144 - Div 2 - 1100 Pt'/><author><name>hef</name><uri>http://www.blogger.com/profile/03019967815360487543</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5021776977741924692.post-6268615526869937848</id><published>2008-07-02T18:34:00.000-07:00</published><updated>2008-07-23T20:56:30.113-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='neural network'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='ann'/><category scheme='http://www.blogger.com/atom/ns#' term='project'/><category scheme='http://www.blogger.com/atom/ns#' term='neural net'/><category scheme='http://www.blogger.com/atom/ns#' term='bnn'/><title type='text'>BNN v1</title><content type='html'>Bitmapping Neural Network (version 1) is a simple neural network that I prototyped after reading &lt;a href="http://www.doc.ic.ac.uk/%7End/surprise_96/journal/vol4/cs11/report.html"&gt;an introduction to artificial neural networks (ANNs)&lt;/a&gt;.  The idea behind the project is to explore ANN fundamentals by creating a neural network which exrapolates patterns from bitmaps.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/neuralnet/src/main/java/hef/neuralnet/bitmap/v1/"&gt;Version 1 (Source)&lt;/a&gt; is comprised of two main classes, &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/neuralnet/src/main/java/hef/neuralnet/bitmap/v1/NeuralNet.java"&gt;NeuralNet&lt;/a&gt; and &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/neuralnet/src/main/java/hef/neuralnet/bitmap/v1/Neuron.java"&gt;Neuron&lt;/a&gt;, and one utility class, &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/neuralnet/src/main/java/hef/neuralnet/bitmap/v1/BitmapUtil.java"&gt;BitmapUtil&lt;/a&gt;.  In this initial version, the neural network's capabilities are limited to downscaling (resizing) a perfect square 0/1 bitmap.  As an additional restriction, all input bitmaps must be an integral constant ratio larger than the expected output (i.e. all input bitmaps must be the same size).&lt;br /&gt;&lt;br /&gt;To test BNN v1, I ran &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/neuralnet/results/hef.neuralnet.bitmap.v1/teach.txt"&gt;4 teach cases&lt;/a&gt;, followed by &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/neuralnet/results/hef.neuralnet.bitmap.v1/use.txt"&gt;5 use cases&lt;/a&gt; on the same NeuralNet instance.  Each case had an expected output length of 10 (i.e. a 10x10 output bitmap), and an input length-ratio of 2 (i.e. a 20x20 input bitmap).  The results of the test were interesting because the code knows &lt;i&gt;nothing&lt;/i&gt; of resizing algorithms; and, yet, it was still able to accurately resize a bitmap with multiple patterns (use 4) and nested patterns (use 5).  The teach cases were interesting precisely because they were uninteresting--four very simple patterns allowed accurate behavior for more complex input.&lt;br /&gt;&lt;br /&gt;Of all the teach cases, however, none taught non-zero data to the neurons which correpsonded to the outer-most bits of the output bitmap.  Thus in any use case involving non-zero input data for those neurons the output bitmap will be incorrect.  This omission exposes the obvious limitation of neural networks: they are only as smart as their teaching mechanism (in this case, handcrafted sample data).  Future work for the project will probably involve addressing this limitation, among other things.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5021776977741924692-6268615526869937848?l=hefdoeshwk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hefdoeshwk.blogspot.com/feeds/6268615526869937848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5021776977741924692&amp;postID=6268615526869937848' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/6268615526869937848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/6268615526869937848'/><link rel='alternate' type='text/html' href='http://hefdoeshwk.blogspot.com/2008/07/bnn-v1.html' title='BNN v1'/><author><name>hef</name><uri>http://www.blogger.com/profile/03019967815360487543</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5021776977741924692.post-2446771233611461083</id><published>2008-06-29T20:06:00.000-07:00</published><updated>2008-06-29T20:08:27.242-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eopl'/><category scheme='http://www.blogger.com/atom/ns#' term='essentials of programming languages'/><category scheme='http://www.blogger.com/atom/ns#' term='scheme'/><title type='text'>EoPL - Ch 1 - Ex 17</title><content type='html'>Exercise 17 in Chapter 1 of &lt;a href="http://books.google.com/books?id=GtPoyremy4EC"&gt;Essentials of Programming Languages&lt;/a&gt; furthers the aims of &lt;a href="http://www.blogger.com/2008/06/eopl-ch-1-ex-15.html"&gt;Exercise 15&lt;/a&gt; and &lt;a href="http://www.blogger.com/2008/06/eopl-ch-1-ex-16.html"&gt;Exercise 16&lt;/a&gt;.  The subparts of Exercise 17 are more algorithmic in nature than the previous exercises, however.  Namely, they touch upon sorting and binary tree traversal.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Ex. 17, Pt. 1&lt;/i&gt;&lt;br /&gt;Define a function &lt;code&gt;path : (n : int) * (bst : BinarySearchTree) -&gt; [left|right]&lt;/code&gt; that returns a list, where each element is either &lt;code&gt;left&lt;/code&gt; or &lt;code&gt;right&lt;/code&gt;, that describes the path to the node in &lt;code&gt;bst&lt;/code&gt; which contains &lt;code&gt;n&lt;/code&gt;.  If that node is the root node, return an empty list. &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.17.1.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Ex. 17, Pt. 2&lt;/i&gt;&lt;br /&gt;Define a function &lt;code&gt;sort : (lon : [int]) -&gt; [int]&lt;/code&gt; that returns a list like &lt;code&gt;lon&lt;/code&gt; but with all elements sorted in increasing order. &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.17.2.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Ex. 17, Pt. 3&lt;/i&gt;&lt;br /&gt;Define a function &lt;code&gt;sort : (predicate : int * int -&gt; bool) * (lon : [int]) -&gt; [int]&lt;/code&gt; that returns a list like &lt;code&gt;lon&lt;/code&gt; but with all elements sorted according to the comparison predicate. &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.17.3.scm"&gt;Solution&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5021776977741924692-2446771233611461083?l=hefdoeshwk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hefdoeshwk.blogspot.com/feeds/2446771233611461083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5021776977741924692&amp;postID=2446771233611461083' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/2446771233611461083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/2446771233611461083'/><link rel='alternate' type='text/html' href='http://hefdoeshwk.blogspot.com/2008/06/eopl-ch-1-ex-17.html' title='EoPL - Ch 1 - Ex 17'/><author><name>hef</name><uri>http://www.blogger.com/profile/03019967815360487543</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5021776977741924692.post-1022706775567469471</id><published>2008-06-25T16:55:00.000-07:00</published><updated>2008-07-07T22:34:09.510-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='topcoder'/><category scheme='http://www.blogger.com/atom/ns#' term='csharp'/><title type='text'>TopCoder - SRM 144 - Div 2 - 550 Pt</title><content type='html'>&lt;i&gt;From Single Round Match No. 144 of &lt;a href="http://www.topcoder.com/tc"&gt;TopCoder&lt;/a&gt;'s Algorithm Competition:&lt;/i&gt;&lt;br /&gt;&lt;quote&gt;Write a method &lt;code&gt;decode&lt;/code&gt; that, given a &lt;code&gt;string&lt;/code&gt; which represents an encoded binary string, where the encoding method dictates &lt;code&gt;bit&lt;sub&gt;enc&lt;/sub&gt;[i] = bit&lt;sub&gt;orig&lt;/sub&gt;[i-1] + bit&lt;sub&gt;orig&lt;/sub&gt;[i] + bit&lt;sub&gt;orig&lt;/sub&gt;[i+1]&lt;/code&gt;, returns a &lt;code&gt;string[]&lt;/code&gt; containing the two possible original binary strings.  These two possible originals are yielded by assuming either &lt;code&gt;bit&lt;sub&gt;orig&lt;/sub&gt;[0] == 0&lt;/code&gt; or &lt;code&gt;bit&lt;sub&gt;orig&lt;/sub&gt;[0] == 1&lt;/code&gt;.  If the encoded string cannot be produced via an assumption, return &lt;code&gt;"NONE"&lt;/code&gt; in place of a binary string.&lt;/quote&gt;&lt;br /&gt;&lt;i&gt;(Full problem specification is copyright TopCoder; and, can be found in the TopCoder problem archives.)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/topcoder/Srm144/Div2/BinaryCode.cs"&gt;Solution.&lt;/a&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/topcoder/Srm144/Div2/BinaryCodeTest.cs"&gt;Unit Tests For Sample Data.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This problem was used as the Division 2 550-point problem and as the Division 1 300-point problem.  The solution here is to rearrange &lt;code&gt;bit&lt;sub&gt;enc&lt;/sub&gt;[i] = bit&lt;sub&gt;orig&lt;/sub&gt;[i-1] + bit&lt;sub&gt;orig&lt;/sub&gt;[i] + bit&lt;sub&gt;orig&lt;/sub&gt;[i+1]&lt;/code&gt; to yield &lt;code&gt;bit&lt;sub&gt;orig&lt;/sub&gt;[j] = bit&lt;sub&gt;enc&lt;/sub&gt;[j-1] - bit&lt;sub&gt;orig&lt;/sub&gt;[j-1] - bit&lt;sub&gt;orig&lt;/sub&gt;[j-2]&lt;/code&gt;.  Then once we generate our original, we only have to verify that &lt;code&gt;bit&lt;sub&gt;enc&lt;/sub&gt;[i&lt;sub&gt;last&lt;/sub&gt;] == bit&lt;sub&gt;orig&lt;/sub&gt;[i&lt;sub&gt;last&lt;/sub&gt;-1] + bit&lt;sub&gt;orig&lt;/sub&gt;[i&lt;sub&gt;last&lt;/sub&gt;]&lt;/code&gt; (and that the original contains only binary digits).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5021776977741924692-1022706775567469471?l=hefdoeshwk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hefdoeshwk.blogspot.com/feeds/1022706775567469471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5021776977741924692&amp;postID=1022706775567469471' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/1022706775567469471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/1022706775567469471'/><link rel='alternate' type='text/html' href='http://hefdoeshwk.blogspot.com/2008/06/topcoder-srm-144-div-2-550-pt.html' title='TopCoder - SRM 144 - Div 2 - 550 Pt'/><author><name>hef</name><uri>http://www.blogger.com/profile/03019967815360487543</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5021776977741924692.post-7279710381333925956</id><published>2008-06-22T20:15:00.000-07:00</published><updated>2008-06-24T12:14:00.773-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shiftsrt'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>ShiftSrt</title><content type='html'>ShiftSrt is a script I wrote to time shift video file subtitles stored in .srt format (see &lt;a href="http://en.wikipedia.org/wiki/SubRip"&gt;SubRip&lt;/a&gt; for .srt fomat examples).&lt;br /&gt;&lt;br /&gt;My motivation for the script came when I downloaded a video with accompanying .srt subtitle file; and, I found the subtitles were out of sync with the video.  Specifically, all of the subtitles were timed to display two and half seconds before the actual dialog occurred.&lt;br /&gt;&lt;br /&gt;I first wrote the script in Python to brush up on my (limited) Python knowledge.  I then ported it to Perl (same reasons).&lt;br /&gt;&lt;br /&gt;Using the script is easy.  Simply provide the following command line arguments (in order) when executing:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;path to the .srt file&lt;/li&gt;&lt;li&gt;amount of time to shift by &lt;i&gt;in milliseconds&lt;/i&gt;&lt;/li&gt;&lt;/ol&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/shiftsrt/python/shiftsrt.py"&gt;Source (Python)&lt;/a&gt;.&lt;br /&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/shiftsrt/perl/shiftsrt.pl"&gt;Source (Perl)&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5021776977741924692-7279710381333925956?l=hefdoeshwk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hefdoeshwk.blogspot.com/feeds/7279710381333925956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5021776977741924692&amp;postID=7279710381333925956' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/7279710381333925956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/7279710381333925956'/><link rel='alternate' type='text/html' href='http://hefdoeshwk.blogspot.com/2008/06/shiftsrt.html' title='ShiftSrt'/><author><name>hef</name><uri>http://www.blogger.com/profile/03019967815360487543</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5021776977741924692.post-2433183460541022675</id><published>2008-06-18T16:23:00.000-07:00</published><updated>2008-07-09T17:56:16.842-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eopl'/><category scheme='http://www.blogger.com/atom/ns#' term='essentials of programming languages'/><category scheme='http://www.blogger.com/atom/ns#' term='scheme'/><title type='text'>EoPL - Ch 1 - Ex 16</title><content type='html'>Exercise 16 in Chapter 1 of &lt;a href="http://books.google.com/books?id=GtPoyremy4EC"&gt;Essentials of Programming Languages&lt;/a&gt; builds on the progress of &lt;a href="http://www.blogger.com/2008/06/eopl-ch-1-ex-15.html"&gt;Exercise 15&lt;/a&gt;.  It further explores programming with lists by delving into deeply-nested list structures (pun intended).  Note that the &lt;code&gt;up&lt;/code&gt; function in Part 1 plays counterpart to the &lt;code&gt;down&lt;/code&gt; function from Exercise 15, Part 9.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Ex. 16, Pt. 1&lt;br /&gt;&lt;/span&gt;Define a function &lt;code&gt;up : (lst : [_]) -&gt; [_]&lt;/code&gt; that returns a list like &lt;code&gt;lst&lt;/code&gt; but with each list-element (element of type list) replaced by the elements that that list-element contains.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.16.1.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Ex. 16, Pt. 2&lt;/span&gt;&lt;br /&gt;Define a function &lt;code&gt;swapper : (s1 : 'a) * (s2 : 'a) * (lst : [_]) -&gt; [_]&lt;/code&gt; that returns a list like &lt;code&gt;lst&lt;/code&gt; but with all instances of &lt;code&gt;s1&lt;/code&gt; replaced by &lt;code&gt;s2&lt;/code&gt;, and all instances of &lt;code&gt;s2&lt;/code&gt; replaced by &lt;code&gt;s1&lt;/code&gt;.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.16.2.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Ex. 16, Pt. 3&lt;/span&gt;&lt;br /&gt;Define a function &lt;code&gt;count-occurrences : (s : 'a) * (slist : [_]) -&gt; int&lt;/code&gt; that returns the number of times &lt;code&gt;s&lt;/code&gt; occurs in &lt;code&gt;slist&lt;/code&gt;, including occurrences nested arbitrarily deep in list-elements of &lt;code&gt;slist&lt;/code&gt;.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.16.3.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Ex. 16, Pt. 4&lt;br /&gt;&lt;/span&gt;Define a function &lt;code&gt;flatten : (slist : [_]) -&gt; [_]&lt;/code&gt; that returns a list of all non-list-elements in &lt;code&gt;slist&lt;/code&gt; (including non-list-elements nested arbitrarily deep within list-elements) in depth-first-traversal order.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.16.4.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Ex. 16, Pt. 5&lt;br /&gt;&lt;/span&gt;Define a function &lt;code&gt;merge : (lon1 : [int]) * (lon2 : [int]) -&gt; [int]&lt;/code&gt; that returns a list, in ascending order, of the elements in &lt;code&gt;lon1&lt;/code&gt; and in &lt;code&gt;lon2&lt;/code&gt;, where &lt;code&gt;lon1&lt;/code&gt; and &lt;code&gt;lon2&lt;/code&gt; are each already sorted in ascending order themselves.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.16.5.scm"&gt;Solution&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5021776977741924692-2433183460541022675?l=hefdoeshwk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hefdoeshwk.blogspot.com/feeds/2433183460541022675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5021776977741924692&amp;postID=2433183460541022675' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/2433183460541022675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/2433183460541022675'/><link rel='alternate' type='text/html' href='http://hefdoeshwk.blogspot.com/2008/06/eopl-ch-1-ex-16.html' title='EoPL - Ch 1 - Ex 16'/><author><name>hef</name><uri>http://www.blogger.com/profile/03019967815360487543</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5021776977741924692.post-1775635120377478110</id><published>2008-06-15T18:52:00.000-07:00</published><updated>2008-07-09T17:58:11.066-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='topcoder'/><category scheme='http://www.blogger.com/atom/ns#' term='csharp'/><title type='text'>TopCoder - SRM 144 - Div 2 - 200 Pt</title><content type='html'>&lt;i&gt;From Single Round Match No. 144 of &lt;a href="http://www.topcoder.com/tc"&gt;TopCoder&lt;/a&gt;'s Algorithm Competition:&lt;/i&gt;&lt;br /&gt;&lt;quote&gt;Write a method &lt;code&gt;whatTime&lt;/code&gt; which takes an &lt;code&gt;int&lt;/code&gt; representing the number of seconds since midnight on some day, and returns a &lt;code&gt;string&lt;/code&gt; formatted as H:M:S.&lt;/quote&gt;&lt;br /&gt;&lt;i&gt;(Full problem specification is copyright TopCoder; and, can be found in the TopCoder problem archives.)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/topcoder/Srm144/Div2/Time.cs"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/topcoder/Srm144/Div2/TimeTest.cs"&gt;Unit Tests For Sample Data&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This problem was used as the Division 2 200-point problem.  Being a 200-point problem, it's very straightforward; and, there are no real "gotchas" involved in the solution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5021776977741924692-1775635120377478110?l=hefdoeshwk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hefdoeshwk.blogspot.com/feeds/1775635120377478110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5021776977741924692&amp;postID=1775635120377478110' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/1775635120377478110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/1775635120377478110'/><link rel='alternate' type='text/html' href='http://hefdoeshwk.blogspot.com/2008/06/topcoder-srm-144-div-2-200-pt.html' title='TopCoder - SRM 144 - Div 2 - 200 Pt'/><author><name>hef</name><uri>http://www.blogger.com/profile/03019967815360487543</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5021776977741924692.post-8085893646438021858</id><published>2008-06-11T17:49:00.000-07:00</published><updated>2008-06-15T06:17:39.655-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='riddle'/><category scheme='http://www.blogger.com/atom/ns#' term='wu:riddles'/><title type='text'>Glass Half Full. Cork, Bottle, Coin. Globe Traversal.</title><content type='html'>&lt;i&gt;&lt;a href="http://www.ocf.berkeley.edu/%7Ewwu/riddles/easy.shtml#glassHalfFull"&gt;Glass Half Full&lt;/a&gt; (source: &lt;a href="http://www.ocf.berkeley.edu/%7Ewwu/riddles/intro.shtml"&gt;[wu:riddles]&lt;/a&gt;):&lt;/i&gt;&lt;br /&gt;&lt;block&gt;You are in an empty room and you have a transparent glass of water. The glass is a right cylinder, and it looks like it's half full, but you're not sure. How can you accurately figure out whether the glass is half full, more than half full, or less than half full? You have no rulers or writing utensils.&lt;/block&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Solution:&lt;/i&gt;&lt;br /&gt;Spread your thumb and index finger on one hand to measure the distance between the top of the glass and the water line.  Lock your thumb and index finger in that position.  Next, move your hand down such that whichever finger was at the top of the glass is now positioned at the water line.  Now, if your other finger is exactly at the the bottom of the glass, the glass is half full.  If that other finger is below the bottom of the glass, the glass is less than half full.  Otherwise (if that other finger is between the water line and the bottom of the glass), the glass is more than half full.&lt;br /&gt;&lt;br /&gt;This problem is a good example of simple solutions being overlooked.  The first two solutions I came up with--rapidly placing the glass upside-down on the floor; or, raising one edge of the glass (tipping the glass) by a length equal the base's diameter--were both more complex and less accurate.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;a href="http://www.ocf.berkeley.edu/%7Ewwu/riddles/easy.shtml#corkBottleCoin"&gt;Cork, Bottle, Coin&lt;/a&gt; (&lt;a href="http://www.ocf.berkeley.edu/%7Ewwu/riddles/intro.shtml"&gt;[wu:riddles]&lt;/a&gt;):&lt;/i&gt;&lt;br /&gt;&lt;block&gt;If you were to put a coin into an empty bottle and then insert a cork in the bottle's opening, how could you remove the coin without taking out the cork or breaking the bottle?&lt;/block&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Solution:&lt;/i&gt;&lt;br /&gt;Push the cork all the way inside the bottle.  Then, remove the coin.&lt;br /&gt;&lt;br /&gt;Another simple solution that can be overlooked.  My guess as to why is that people are accustomed to undoing things by way of the opposite of what they did in the first place (e.g., if the door was opened via a pull, it should be closed via a push).  The lesson here is to question your approach--or more broadly, your assumptions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;a href="http://www.ocf.berkeley.edu/~wwu/riddles/medium.shtml#globeTraversal"&gt;Globe Traversal&lt;/a&gt; (source: &lt;a href="http://www.ocf.berkeley.edu/%7Ewwu/riddles/intro.shtml"&gt;[wu:riddles]&lt;/a&gt;):&lt;/i&gt;&lt;br /&gt;&lt;quote&gt;How many places are there on the earth that one could walk one mile south, then one mile west, then one mile north and end up in the same spot? To be precise, let's assume the earth is a solid smooth sphere, so oceans and mountains and other such things do not exist. You can start at any point on the sphere. Also, the rotation of the earth has nothing to do with the solution; you can assume you're walking on a static sphere if that makes the problem less complicated to you.&lt;/quote&gt;&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;Infinitely many.  To see this, temporarily disregard the south and north legs of the journey, as they will eventually cancel each other out.  Now, the only way to travel west for some distance and end up in the same place we started is if we circle the globe.  Thus we pick a cross-section of the earth perpendicular to its axis, say near the South Pole, which produces a circle having a circumference of one mile.  Note that this circle is comprised (at least theoretically) of infinitely many points; and, that walking around the edge of this circle for one mile will always take us back to our original position.  Now we factor the south and north legs of the journey back in by simply shifting our infinitely many starting points one mile north.&lt;br /&gt;&lt;br /&gt;This is another solution that involves an atypical "undo action."  Specifically, typical reasoning suggests that for each unit traveled in one direction, one must travel one unit in the opposite direction in order to return to where to he started.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5021776977741924692-8085893646438021858?l=hefdoeshwk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hefdoeshwk.blogspot.com/feeds/8085893646438021858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5021776977741924692&amp;postID=8085893646438021858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/8085893646438021858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/8085893646438021858'/><link rel='alternate' type='text/html' href='http://hefdoeshwk.blogspot.com/2008/06/glass-half-full-et-al.html' title='Glass Half Full. Cork, Bottle, Coin. Globe Traversal.'/><author><name>hef</name><uri>http://www.blogger.com/profile/03019967815360487543</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5021776977741924692.post-4236145992846644547</id><published>2008-06-08T19:07:00.000-07:00</published><updated>2008-07-09T18:04:13.679-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eopl'/><category scheme='http://www.blogger.com/atom/ns#' term='essentials of programming languages'/><category scheme='http://www.blogger.com/atom/ns#' term='scheme'/><title type='text'>EoPL - Ch 1 - Ex 15</title><content type='html'>Exercise 15 in Chapter 1 of &lt;a href="http://books.google.com/books?id=GtPoyremy4EC"&gt;Essentials of Programming Languages&lt;/a&gt; attempts to familiarize the reader with programming in the Scheme.  It's split into ten parts that together provide a gentle introduction to working with lists, and to a lesser extent vectors, in a functional programming language.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Ex. 15, Pt. 1&lt;/span&gt;&lt;br /&gt;Define a function &lt;code&gt;duple : (n : int) * (x : 'a) -&gt; ['a]&lt;/code&gt; that returns a list containing &lt;code&gt;n&lt;/code&gt; copies of &lt;code&gt;x&lt;/code&gt;.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.15.1.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Ex. 15, Pt. 2&lt;/span&gt;&lt;br /&gt;Define a function &lt;code&gt;invert : (lst : [('a,'b)]) -&gt; [('b,'a)]&lt;/code&gt; that returns a list like &lt;code&gt;lst&lt;/code&gt; but with each pair element of reversed.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.15.2.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Ex. 15, Pt. 3&lt;/span&gt;&lt;br /&gt;Define a function &lt;code&gt;filter-in : (pred : 'a -&gt; bool) * (lst : ['a]) -&gt; ['a]&lt;/code&gt; that returns a list of the elements in &lt;code&gt;lst&lt;/code&gt; for which &lt;code&gt;pred&lt;/code&gt; succeeds.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.15.3.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Ex. 15, Pt. 4&lt;br /&gt;&lt;/span&gt;Define a function &lt;code&gt;every? : (pred : 'a -&gt; bool) * (lst : ['a]) -&gt; bool&lt;/code&gt; that returns &lt;code&gt;false&lt;/code&gt; if &lt;code&gt;pred&lt;/code&gt; fails for any element of &lt;code&gt;lst&lt;/code&gt;, or otherwise returns &lt;code&gt;true&lt;/code&gt;.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.15.4.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Ex. 15, Pt. 5&lt;br /&gt;&lt;/span&gt;Define a function &lt;code&gt;exists? : (pred : 'a -&gt; bool) * (lst : ['a]) -&gt; bool&lt;/code&gt; that returns &lt;code&gt;true&lt;/code&gt; if &lt;code&gt;pred&lt;/code&gt; succeeds for any element of &lt;code&gt;lst&lt;/code&gt;, or otherwise returns &lt;code&gt;false&lt;/code&gt;.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.15.5.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Ex. 15, Pt. 6&lt;/span&gt;&lt;br /&gt;Define a function &lt;code&gt;vector-index : (pred : 'a -&gt; bool) * (v : #['a]) -&gt; int|FALSE &lt;/code&gt; that returns the zero-based index of the first element in &lt;code&gt;v&lt;/code&gt; for which &lt;code&gt;pred&lt;/code&gt; succeeds, or returns &lt;code&gt;false&lt;/code&gt; if no such element exists.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.15.6.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Ex. 15, Pt. 7&lt;/span&gt;&lt;br /&gt;Define a function &lt;code&gt;list-set : (lst : ['a]) * (n : int) * (x : 'a) -&gt; ['a]&lt;/code&gt; that returns a list similar to &lt;code&gt;lst&lt;/code&gt;, except that the &lt;code&gt;n&lt;/code&gt;-th (using zero-based indexing) element is replaced with &lt;code&gt;x&lt;/code&gt;.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.15.7.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Ex. 15, Pt. 8&lt;/span&gt;&lt;br /&gt;Define a function &lt;code&gt;product : (los1 : ['a]) * (los2 : ['b]) -&gt; [('a, 'b)]&lt;/code&gt; that returns a list of pairs (in any order) that represents the Cartesian product of &lt;code&gt;los1&lt;/code&gt; and &lt;code&gt;los2&lt;/code&gt;.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.15.8.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Ex. 15, Pt. 9&lt;br /&gt;&lt;/span&gt;Define a function &lt;code&gt;down : (lst : [_]) -&gt; [[_]]&lt;/code&gt; that returns a list like &lt;code&gt;lst&lt;/code&gt; but with each element wrapped in its own (single-element) list.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.15.9.scm"&gt;Solution&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Ex. 15, Pt. 10&lt;/span&gt;&lt;br /&gt;Define a function &lt;code&gt;vector-append-list : (v : #['a]) * (lst : ['a]) -&gt; #['a]&lt;/code&gt; that returns a new vector with the elements of &lt;code&gt;v&lt;/code&gt; followed by the elements of &lt;code&gt;lst&lt;/code&gt;.  Do not use any built-in vector-to-list, list-to-vector, or append functions.  &lt;a href="http://code.google.com/p/hefdoeshwk/source/browse/trunk/eopl2/scheme/1.15.10.scm"&gt;Solution&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5021776977741924692-4236145992846644547?l=hefdoeshwk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hefdoeshwk.blogspot.com/feeds/4236145992846644547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5021776977741924692&amp;postID=4236145992846644547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/4236145992846644547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/4236145992846644547'/><link rel='alternate' type='text/html' href='http://hefdoeshwk.blogspot.com/2008/06/eopl-ch-1-ex-15.html' title='EoPL - Ch 1 - Ex 15'/><author><name>hef</name><uri>http://www.blogger.com/profile/03019967815360487543</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5021776977741924692.post-5398579773159601181</id><published>2008-06-04T20:26:00.000-07:00</published><updated>2008-06-04T20:34:39.024-07:00</updated><title type='text'>Introduction</title><content type='html'>My name is Hef; and, I like to solve problems.  This blog is an amalgam of various academic exercises, riddles, and puzzles.  Whenever I solve a problem I think is interesting, I post it here with my solution and any commentary I may have.&lt;br /&gt;&lt;br /&gt;This blog's overarching purpose is to record a history of problems I've solved; to motivate me to solve ever more problems; and to yield insights towards continuously improving my problem solving abilities.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5021776977741924692-5398579773159601181?l=hefdoeshwk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/5398579773159601181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5021776977741924692/posts/default/5398579773159601181'/><link rel='alternate' type='text/html' href='http://hefdoeshwk.blogspot.com/2008/06/introduction.html' title='Introduction'/><author><name>hef</name><uri>http://www.blogger.com/profile/03019967815360487543</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
