<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gururaj Gupta on Medium]]></title>
        <description><![CDATA[Stories by Gururaj Gupta on Medium]]></description>
        <link>https://medium.com/@gururajgpt544?source=rss-80d3f4e7ae03------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4CjrQBcVt52s6omb7tm1FQ.jpeg</url>
            <title>Stories by Gururaj Gupta on Medium</title>
            <link>https://medium.com/@gururajgpt544?source=rss-80d3f4e7ae03------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 11:20:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gururajgpt544/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Greedy Algorithm to find Minimum number of Coins]]></title>
            <link>https://medium.com/@gururajgpt544/greedy-algorithm-to-find-minimum-number-of-coins-6d364b40afd7?source=rss-80d3f4e7ae03------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d364b40afd7</guid>
            <category><![CDATA[greedy-algorithms]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Gururaj Gupta]]></dc:creator>
            <pubDate>Thu, 05 Sep 2019 04:59:52 GMT</pubDate>
            <atom:updated>2019-09-05T05:03:17.031Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fxX-psybShomN0hhhFXquA.png" /></figure><p>A greedy algorithm is an algorithmic paradigm that follows the problem solving heuristic of making the locally optimal choice at each stage with the intent of finding a global optimum.</p><p>So the problem is stated as we have been given a value V, if we want to make change for V Rs, and we have infinite supply of { 1, 2, 5, 10, 20} valued coins, what is the minimum number of coins and/or notes needed to make the change?</p><p><strong>Solution: </strong>The idea is simple Greedy Algorithm. Start from largest possible denomination and keep adding denominations while remaining value is greater than 0.</p><p>1) Initialize result as empty.<br>2) Find the largest denomination that is smaller than V.<br>3) Add found denomination to result. Subtract value of found denomination from V.<br>4) If V becomes 0, then print result. <br>Else repeat steps 2 and 3 for new value of V</p><p><strong>Examples:</strong></p><p>Input: V = 70<br>Output: 5<br>We need 4 20 Rs coin and a 10 Rs coin.</p><p>Input: V = 7<br>Output: 3<br>We need a 10 Rs coin, a 5 Rs coin and a <br>2 Rs coin.</p><p><strong><em>C++ program</em></strong></p><p>#include &lt;iostream&gt; <br>using namespace std; <br> <br>int deno[] = { 1, 2, 5, 10, 20}; <br>int n = sizeof(deno) / sizeof(deno[0]); <br> <br>void findMin(int V) <br>{</p><p>{ <br> for (int i= 0; i &lt; n-1; i++) {<br> for (int j= 0; j &lt; n-i-1; j++){ <br> if (deno[j] &gt; deno[j+1]) <br> swap(&amp;deno[j], &amp;deno[j+1]); <br>}</p><p>int ans[V]; <br> for (int i = 0; i &lt;n; i++) { <br> while (V &gt;= deno[i]) { <br> V -= deno[i]; <br> ans[i]=deno[i];<br> } <br> } <br> <br> for (int i = 0; i &lt; ans.size(); i++) <br> cout &lt;&lt; ans[i] &lt;&lt; “ “; <br>} <br> <br>// Main Program<br>int main() <br>{<br> int a; <br> cout&lt;&lt;”Enter you amount “;<br> cin&gt;&gt;a;<br> cout &lt;&lt; “Following is minimal number of change for “ &lt;&lt; a&lt;&lt; “ is “; <br> findMin(a); <br> return 0; <br>}</p><p><strong><em>Output:</em></strong></p><p>Enter you amount: 70<br>Following is minimal number of change for 70: 20 20 20 10</p><p>Time complexity of the greedy coin change algorithm will be:</p><ol><li>For sorting n coins O(nlogn).</li><li>While loop, the worst case is O(total). If all we have is the coin with 1-denomination.</li><li>Complexity for coin change problem becomes O(n log n) + O(total).</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d364b40afd7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI implementation through Machine learning and Deep learning]]></title>
            <link>https://medium.com/@gururajgpt544/ai-implementation-through-machine-learning-and-deep-learning-cd747c82823a?source=rss-80d3f4e7ae03------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd747c82823a</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Gururaj Gupta]]></dc:creator>
            <pubDate>Wed, 04 Sep 2019 21:08:34 GMT</pubDate>
            <atom:updated>2019-09-04T21:18:35.077Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview of AI implementation through Machine and Deep learning</h3><p><strong>What is <em>AI</em>?</strong> Simply put intelligence demonstrated by machines. In a more defined way, we can say the ability of computer programs to think and learn. The aim is to create intelligent machines so that they can work like humans.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YDXi_QIHoCXLppOUwIon9Q.jpeg" /></figure><p>Artificial intelligence solved problems that are intellectually difficult for human beings but relatively straightforward for computers, problems that can be described by mathematical rules. The true challenge to artificial intelligence proved to be solving the tasks that are easy for people to perform but hard for people to describe, problems that we solve intuitively, that feel automatic, like recognizing faces, words, etc. Early successes of AI like designing chess-playing system <em>(Deep Blue chess by IBM which defeated world champion Garry Kasparov)</em> did not require to have much knowledge about the world. Chess can be completely described by a very brief list of completely formal rules, easily provided ahead of time by the programmer.</p><p>Although AI has been able to defeat beat best chess player in the world but is only recently matching some of the abilities of human beings like recognizing faces or speech. Human beings everyday knowledge about the world is greatly intuitive, much difficult to describe formally. Computers need to capture this same knowledge to behave intelligently. One of the key challenges in artificial intelligence is how to get this informal knowledge into a computer.</p><p>A practical solution that comes to mind would be to hard code every concept in computers since that’s what they lack in the first place. This approach is <strong><em>knowledge base</em> </strong>approach toward AI but it has not produced the desired result because of high complexity to accurately describe the world.</p><p>Since we cannot introduce everything at first step, AI needs to learn itself by acquiring information from raw data (original/first data given to machine). This capability is known as <strong><em>machine learning</em></strong><em>.</em> A simple machine learning algorithm called <em>naive Bayes</em> can separate legitimate e-mail from spam e-mail.<br>The performance of these simple machine learning algorithms depends heavily on the representation of the data they are given. In computer science, operations such as searching a collection of data can proceed exponentially faster if the collection is structured and indexed intelligently. Many artificial intelligence tasks can be solved by designing the right set of features to extract for that task, then providing these features to a simple machine learning algorithm. For example, a useful feature for speaker identification from the sound is an estimate of the size of the speaker’s vocal tract. It, therefore, gives a strong clue as to whether the speaker is a man, woman, or child. However, for many tasks, it is difficult to know what features should be extracted. For example, suppose that we would like to write a program to detect cars in photographs. We know that cars have wheels, so we might like to use the wheel as a feature. Unfortunately, it is difficult to describe exactly what a wheel looks like in terms of pixel values. A wheel has a simple geometric shape but its image may be complicated by shadows falling on the wheel, the sun glaring off the metal parts of the wheel, the fender of the car or an object in the foreground obscuring part of the wheel, and so on.</p><p>It can be very difficult to extract high-level, abstract features from raw data. Many of these factors such as a speaker’s accent, which can be identified only using the sophisticated, nearly human-level understanding of the data. When it is nearly as difficult to obtain representation to solve the problem.</p><p><strong><em>Deep learning</em></strong><em> </em>solves this central problem in representation learning by introducing representations that are expressed in terms of other, simpler representations. <em>Deep learning allows the computer to build complex concepts out of simpler concepts</em>. An example of a deep learning model is the feed forward deep network or <em>multi-layer perceptron (MLP)</em>. A multi-layer perceptron is just a mathematical function mapping some set of input values to output values. The function is formed by composing many simpler functions.</p><p>The hierarchy of concepts allows the computer to learn complicated concepts by building them out of simpler ones. If we draw a graph showing how these concepts are built on top of each other, the graph is deep, with many layers. For this reason, we call this approach to AI <strong><em>deep learning</em></strong><em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YmSMp-bHlGjud1TZWH0teQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd747c82823a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>