<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Problem on Zio Ivan</title>
    <link>https://ivandemarino.me/tags/problem/</link>
    <description>Recent content in Problem on Zio Ivan</description>
    <generator>Hugo</generator>
    <language>en</language>
    <managingEditor>detronizator&#43;blog@gmail.com (Ivan De Marino, aka &#34;Zio Ivan&#34;, aka &#34;detro&#34;)</managingEditor>
    <webMaster>detronizator&#43;blog@gmail.com (Ivan De Marino, aka &#34;Zio Ivan&#34;, aka &#34;detro&#34;)</webMaster>
    <copyright>2004-2026 Ivan De Marino. Licensed under CC BY 4.0</copyright>
    <lastBuildDate>Fri, 22 Jan 2010 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://ivandemarino.me/tags/problem/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>&#34;Bidirectionally multiplied&#34; array</title>
      <link>https://ivandemarino.me/posts/bidirectionally-multiplied-array/</link>
      <pubDate>Fri, 22 Jan 2010 00:00:00 +0000</pubDate><author>detronizator&#43;blog@gmail.com (Ivan De Marino, aka &#34;Zio Ivan&#34;, aka &#34;detro&#34;)</author>
      <guid>https://ivandemarino.me/posts/bidirectionally-multiplied-array/</guid>
      <description>&lt;p&gt;Another small problem before I go to sleep tonight:&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;There is an array A[N] of N numbers.
You have to compose an array Output[N] such that Output[i] will be equal
to multiplication of all the elements of A[N] except A[i].
For example Output[0] will be multiplication of A[1] to A[N-1] and Output[1]
will be multiplication of A[0] and from A[2] to A[N-1].
&lt;strong&gt;Solve it without division operator and in O(n).&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Money change problem: Greedy vs. Dyn.Pro.</title>
      <link>https://ivandemarino.me/posts/money-change-problem-greedy-vs-dyn-pro/</link>
      <pubDate>Sun, 17 Jan 2010 00:00:00 +0000</pubDate><author>detronizator&#43;blog@gmail.com (Ivan De Marino, aka &#34;Zio Ivan&#34;, aka &#34;detro&#34;)</author>
      <guid>https://ivandemarino.me/posts/money-change-problem-greedy-vs-dyn-pro/</guid>
      <description>&lt;p&gt;This is a classical problem of &lt;a href=&#34;http://en.wikipedia.org/wiki/Computer_science&#34;&gt;Computer Science&lt;/a&gt;: it&amp;rsquo;s used to study both &lt;a href=&#34;http://en.wikipedia.org/wiki/Greedy_algorithm&#34;&gt;Greedy&lt;/a&gt; and &lt;a href=&#34;http://en.wikipedia.org/wiki/Dynamic_programming&#34;&gt;Dynamic Programming&lt;/a&gt; algorithmic techniques.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;Coins&#34; loading=&#34;lazy&#34; src=&#34;http://www.freephotosbank.com/photographers/photos1/45/med_53ff4957d796d0ff0a7d3151ec4e4a20.jpg&#34;&gt;
I hate having my pocket full of copper!!! -_-&lt;/p&gt;
&lt;h2 id=&#34;definition&#34;&gt;Definition&lt;/h2&gt;
&lt;p&gt;Given:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;A set of &lt;code&gt;n&lt;/code&gt; Denominations &lt;code&gt;D[0&amp;hellip;n-1]&lt;/code&gt; in ascending order, representing a Monetary Coin System&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;An money amount &lt;code&gt;A&lt;/code&gt;, as input&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;calculate a solution:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;* &amp;lt;strong&amp;gt;&amp;lt;code&amp;gt;S[0...n-1]&amp;lt;/code&amp;gt;&amp;lt;/strong&amp;gt;, with &amp;lt;code&amp;gt;0 &amp;amp;lt;= S[i] &amp;amp;lt;= (A/S[i])&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;0 &amp;amp;lt; i &amp;amp;lt; n-1&amp;lt;/code&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;where:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;* &amp;lt;strong&amp;gt;&amp;lt;code&amp;gt;A = Sum&amp;lt;sub&amp;gt;[i=0 -&amp;gt; n-1]&amp;lt;/sub&amp;gt; { D[i] * S[i] }&amp;lt;/code&amp;gt;&amp;lt;/strong&amp;gt;

* &amp;lt;strong&amp;gt;&amp;lt;code&amp;gt;Min{ Sum&amp;lt;sub&amp;gt;[i=0 -&amp;gt; n-1]&amp;lt;/sub&amp;gt; { S[i] } }&amp;lt;/code&amp;gt;&amp;lt;/strong&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;in-other-words&#34;&gt;In other words&lt;/h2&gt;
&lt;p&gt;Find the smallest amount of coins to make the given amount.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
