<?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 Ninad Lunge on Medium]]></title>
        <description><![CDATA[Stories by Ninad Lunge on Medium]]></description>
        <link>https://medium.com/@nlunge786?source=rss-39d9398954ff------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*QMeztMtSdIVzrOhK</url>
            <title>Stories by Ninad Lunge on Medium</title>
            <link>https://medium.com/@nlunge786?source=rss-39d9398954ff------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 08:39:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nlunge786/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[Game Based Learning Example: A Classic Water Jug Problem]]></title>
            <link>https://medium.com/@nlunge786/game-based-learning-example-a-classic-water-jug-problem-2e2fc68daa3a?source=rss-39d9398954ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e2fc68daa3a</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[game-based-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[water-jug-problem]]></category>
            <dc:creator><![CDATA[Ninad Lunge]]></dc:creator>
            <pubDate>Sun, 22 Sep 2024 14:58:31 GMT</pubDate>
            <atom:updated>2024-09-22T14:58:31.500Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction:</h3><p>Water jug problems are a classic puzzle in the world of algorithmic problem-solving. They test your ability to think outside the box and find solutions to seemingly simple tasks using limited tools. In this blog, we’ll explore a famous water jug problem: Given three jugs with capacities of 12 gallons, 8 gallons, and 3 gallons, how can we measure out exactly 1 gallon of water?</p><h3>Problem Setup:</h3><p>We are given three jugs:</p><ul><li>A 12-gallon jug,</li><li>An 8-gallon jug, and</li><li>A 3-gallon jug.</li></ul><p>There is also a faucet available to fill any jug with water, and you can empty the jugs onto the ground or pour from one jug to another. The goal is to measure exactly 1 gallon of water using these jugs.</p><p>At first glance, this might seem easy — but there’s a catch. The jugs don’t have any measurement markers, and we can’t just pour out small amounts. Instead, we must think systematically about how we can fill and transfer water between the jugs to isolate exactly 1 gallon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*SDdZefoZOqBVUcDoY9fnwg.png" /></figure><h3>Problem Formulation:</h3><p>Before diving into the solution, let’s formalize the problem:</p><ol><li><strong>State Representation</strong>: At any point, the amount of water in each jug can be represented by a tuple (x, y, z) where:</li></ol><ul><li>x is the amount of water in the 12-gallon jug,</li><li>y is the amount of water in the 8-gallon jug, and</li><li>z is the amount of water in the 3-gallon jug.</li></ul><p><strong>2. Initial State: </strong>All jugs are empty: (0, 0, 0).</p><p><strong>3. Goal State: </strong>The goal is to reach a state where one of the jugs contains exactly 1 gallon. That is, we want the state to be (1, y, z), (x, 1, z), or (x, y, 1) for some values of x, y, and z.</p><p><strong>4. Available Operations:</strong></p><ul><li><strong>Fill a jug</strong>: Completely fill any jug to its maximum capacity.</li><li><strong>Empty a jug</strong>: Completely empty any jug.</li><li><strong>Pour between jugs</strong>: Transfer water from one jug to another until the first jug is empty or the second jug is full.</li></ul><p>With these rules in mind, let’s look at how we can solve the problem.</p><h3>Solution Strategy:</h3><p>The strategy involves using these operations to progressively fill and transfer water between jugs, eventually isolating exactly 1 gallon. Here’s a step-by-step breakdown:</p><ol><li><strong>Fill the 8-gallon jug</strong>: We start by filling the 8-gallon jug to its maximum capacity. Now the state is (0, 8, 0).</li></ol><p><strong>2. Pour from the 8-gallon jug into the 3-gallon jug</strong>: Pour water from the 8-gallon jug into the 3-gallon jug until the smaller jug is full. After this step, the state is (0, 5, 3).</p><p><strong>3. Empty the 3-gallon jug</strong>: Empty the 3-gallon jug, returning the state to (0, 5, 0).</p><p><strong>4. Pour from the 8-gallon jug into the 3-gallon jug again</strong>: Pour the remaining 5 gallons from the 8-gallon jug into the empty 3-gallon jug. Now the state is (0, 2, 3).</p><p><strong>5. Fill the 8-gallon jug again</strong>: Refill the 8-gallon jug completely, giving the state (0, 8, 3).</p><p><strong>6. Pour from the 8-gallon jug into the 3-gallon jug</strong>: Pour water from the 8-gallon jug into the 3-gallon jug until the smaller jug is full. The 3-gallon jug can hold only 1 more gallon, so after this step, the state is (7, 8, 3).</p><p>At this point, we have exactly 1 gallon left in the 12-gallon jug. Success!</p><h3>Conclusion:</h3><p>The water jug problem demonstrates how problem-solving often involves thinking creatively about constraints and possibilities. By using the operations of filling, emptying, and pouring between jugs, we were able to arrive at a solution to measure exactly 1 gallon of water.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e2fc68daa3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Deep Architecture: Multi-Layer Perceptron]]></title>
            <link>https://medium.com/@nlunge786/a-deep-architecture-multi-layer-perceptron-164bc5ff3842?source=rss-39d9398954ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/164bc5ff3842</guid>
            <category><![CDATA[artificial-neural-network]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[multilayer-perceptron]]></category>
            <dc:creator><![CDATA[Ninad Lunge]]></dc:creator>
            <pubDate>Sun, 24 Mar 2024 06:38:21 GMT</pubDate>
            <atom:updated>2024-03-24T06:38:21.728Z</atom:updated>
            <content:encoded><![CDATA[<p>Before beginning with the Perceptron, it is essential that we have some basic understanding about <strong><em>Artificial Neural Networks</em></strong>.</p><p>An <strong><em>artificial neural network</em></strong><em> </em>(ANN) is a machine learning model inspired by the structure and function of the human brain’s interconnected network of neurons. It consists of interconnected nodes called <strong>artificial neurons</strong>, organized into layers. Information flows through the network, with each neuron processing input signals and producing an output signal that influences other neurons in the network.</p><p>A <strong><em>multi-layer perceptron (MLP)</em></strong> is a type of artificial neural network consisting of multiple layers of neurons. The neurons in the MLP typically use nonlinear activation functions, allowing the network to learn complex patterns in data. MLPs are significant in machine learning because they can learn nonlinear relationships in data, making them powerful models for tasks such as classification, regression, and pattern recognition.</p><h3>Perceptron:</h3><p>Perceptron was introduced by <strong><em>Frank Rosenblatt</em></strong> in 1957. A Perceptron is an algorithm for supervised learning of binary classifiers. This algorithm enables neurons to learn and processes elements in the training set one at a time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*3f3tE2cyzmBjq3tBig0uoA.png" /><figcaption>A Perceptron</figcaption></figure><h3>Multilayer Perceptron:</h3><p>A multilayer perceptron is a type of feedforward neural network consisting of fully connected neurons with a nonlinear kind of activation function. It is widely used to distinguish data that is not linearly separable.</p><p>MLPs have been widely used in various fields, including image recognition, natural language processing, and speech recognition, among others. Their flexibility in architecture and ability to approximate any function under certain conditions make them a fundamental building block in deep learning and neural network research. Some of its key concepts are as follows:</p><h4>Input layer:</h4><p>The input layer consists of nodes or neurons that receive the initial input data. Each neuron represents a feature or dimension of the input data. The number of neurons in the input layer is determined by the dimensionality of the input data.</p><h4>Hidden layer:</h4><p>Between the input and output layers, there can be one or more layers of neurons. Each neuron in a hidden layer receives inputs from all neurons in the previous layer (either the input layer or another hidden layer) and produces an output that is passed to the next layer. The number of hidden layers and the number of neurons in each hidden layer are hyperparameters that need to be determined during the model design phase.</p><h4>Output layer:</h4><p>This layer consists of neurons that produce the final output of the network. The number of neurons in the output layer depends on the nature of the task. In binary classification, there may be either one or two neurons depending on the activation function and representing the probability of belonging to one class; while in multi-class classification tasks, there can be multiple neurons in the output layer.</p><h4>Weights:</h4><p>Neurons in adjacent layers are fully connected to each other. Each connection has an associated weight, which determines the strength of the connection. These weights are learned during the training process.</p><h4>Bias Neurons:</h4><p>In addition to the input and hidden neurons, each layer (except the input layer) usually includes a bias neuron that provides a constant input to the neurons in the next layer. The bias neuron has its own weight associated with each connection, which is also learned during training.</p><p>The bias neuron effectively shifts the activation function of the neurons in the subsequent layer, allowing the network to learn an offset or bias in the decision boundary. By adjusting the weights connected to the bias neuron, the MLP can learn to control the threshold for activation and better fit the training data.</p><h4>Activation Function:</h4><p>Typically, each neuron in the hidden layers and the output layer applies an activation function to its weighted sum of inputs. Common activation functions include sigmoid, tanh, ReLU (Rectified Linear Unit), and softmax. These functions introduce nonlinearity into the network, allowing it to learn complex patterns in the data.</p><h4>Training with Backpropagation:</h4><p>MLPs are trained using the backpropagation algorithm, which computes gradients of a loss function with respect to the model’s parameters and updates the parameters iteratively to minimize the loss.</p><h3>Layer by Layer Working of a Multilayer Perceptron:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k_qarynPR-7Lb-jVUpq_Qw.png" /><figcaption><em>Example of a MLP having two hidden layers</em></figcaption></figure><p>In a multilayer perceptron, neurons process information in a step-by-step manner, performing computations that involve weighted sums and nonlinear transformations. Let’s walk layer by layer to see the magic that goes within.</p><h4>Input layer:</h4><ul><li>The input layer of an MLP receives input data, which could be features extracted from the input samples in a dataset. Each neuron in the input layer represents one feature.</li><li>Neurons in the input layer do not perform any computations; they simply pass the input values to the neurons in the first hidden layer.</li></ul><h4>Hidden layers:</h4><ul><li>The hidden layers of an MLP consist of interconnected neurons that perform computations on the input data.</li><li>Each neuron in a hidden layer receives input from all neurons in the previous layer. The inputs are multiplied by corresponding weights, denoted as w. The weights determine how much influence the input from one neuron has on the output of another.</li><li>In addition to weights, each neuron in the hidden layer has an associated bias, denoted as b. The bias provides an additional input to the neuron, allowing it to adjust its output threshold. Like weights, biases are learned during training.</li><li>For each neuron in a hidden layer or the output layer, the weighted sum of its inputs is computed. This involves multiplying each input by its corresponding weight, summing up these products, and adding the bias:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/0*58yyUexG0DZc05G5.png" /></figure><p>Where n is the total number of input connections, wi is the weight for the i-th input, and xi is the i-th input value.</p><ul><li>The weighted sum is then passed through an activation function, denoted as f. The activation function introduces nonlinearity into the network, allowing it to learn and represent complex relationships in the data. The activation function determines the output range of the neuron and its behavior in response to different input values. The choice of activation function depends on the nature of the task and the desired properties of the network.</li></ul><h4>Output layer:</h4><ul><li>The output layer of an MLP produces the final predictions or outputs of the network. The number of neurons in the output layer depends on the task being performed (e.g., binary classification, multi-class classification, regression).</li><li>Each neuron in the output layer receives input from the neurons in the last hidden layer and applies an activation function. This activation function is usually different from those used in the hidden layers and produces the final output value or prediction.</li></ul><p>During the training process, the network learns to adjust the weights associated with each neuron’s inputs to minimize the discrepancy between the predicted outputs and the true target values in the training data. By adjusting the weights and learning the appropriate activation functions, the network learns to approximate complex patterns and relationships in the data, enabling it to make accurate predictions on new, unseen samples.</p><p>This adjustment is guided by an optimization algorithm, such as stochastic gradient descent (SGD), which computes the gradients of a loss function with respect to the weights and updates the weights iteratively.</p><h3>Data Preparation for Multilayer Perceptron:</h3><p>Preparing data for training an MLP involves cleaning, preprocessing, scaling, splitting, formatting, and maybe even augmenting the data. Based on the activation functions used and the scale of the input features, the data might need to be standardized or normalized. Experimenting with different preprocessing techniques and evaluating their impact on model performance is often necessary to determine the most suitable approach for a particular dataset and task.</p><h4><strong>Data Cleaning and Preprocessing:</strong></h4><ul><li>Handle missing values: Remove or impute missing values in the dataset.</li><li>Encode categorical variables: Convert categorical variables into numerical representations, such as one-hot encoding.</li></ul><h4><strong>Feature Scaling:</strong></h4><ul><li>Standardization or normalization: Rescale the features to a similar scale to ensure that the optimization process converges efficiently.</li><li>Standardization (Z-score normalization): Subtract the mean and divide by the standard deviation of each feature. It centers the data around zero and scales it to have unit variance.</li><li>Normalization (Min-Max scaling): Scale the features to a fixed range, typically between 0 and 1, by subtracting the minimum value and dividing by the range (max-min).</li></ul><h4><strong>Train-Validation-Test Split:</strong></h4><ul><li>Split the dataset into training, validation, and test sets. The training set is used to train the model, the validation set is used to tune hyperparameters and monitor model performance, and the test set is used to evaluate the final model’s performance on unseen data.</li></ul><h4><strong>Data Formatting:</strong></h4><ul><li>Ensure that the data is in the appropriate format for training. This may involve reshaping the data or converting it to the required data type (e.g., converting categorical variables to numeric).</li></ul><h4><strong>Optional Data Augmentation:</strong></h4><ul><li>For tasks such as image classification, data augmentation techniques such as rotation, flipping, and scaling may be applied to increase the diversity of the training data and improve model generalization.</li></ul><h4><strong>Normalization and Activation Functions:</strong></h4><ul><li>The choice between standardization and normalization may depend on the activation functions used in the MLP. Activation functions like sigmoid and tanh are sensitive to the scale of the input data and may benefit from standardization.</li></ul><h3>Conclusion:</h3><p>Multilayer perceptrons represent a fundamental and versatile class of artificial neural networks that have significantly contributed to the advancement of machine learning and artificial intelligence. Through their interconnected layers of neurons and nonlinear activation functions, MLPs are capable of learning complex patterns and relationships in data, making them well-suited for a wide range of tasks. The history of MLPs reflects a journey of exploration, discovery, and innovation, from the early perceptron models to the modern deep learning architectures that power many state-of-the-art systems today.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=164bc5ff3842" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Navigating the Seas of Dependability in Software-Intensive Systems]]></title>
            <link>https://medium.com/@nlunge786/navigating-the-seas-of-dependability-in-software-intensive-systems-c309e88f207c?source=rss-39d9398954ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/c309e88f207c</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[dependability]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Ninad Lunge]]></dc:creator>
            <pubDate>Sat, 18 Nov 2023 13:32:20 GMT</pubDate>
            <atom:updated>2023-11-18T13:32:20.810Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction:</strong></p><p>In an era where computer systems have become a part of our personal and professional lives, the negative consequences of system and software failures are increasing. From potential revenue losses in e-commerce due to server failures to the safety risks associated with software errors in embedded control systems, the stakes are higher than ever. This blog explores the importance of dependability in software-intensive systems.</p><p><strong>The Significance of Dependability:</strong></p><p>Dependability, a term coined by Laprie in 1995, encapsulates crucial system attributes such as availability, reliability, safety, and security. The dependability of systems enables us in ensuring smooth operations, especially as failures can impact a large number of users, leading to rejection by users and colossal financial implications. The cost of system failure, especially in critical applications like reactor control or aircraft navigation, can be exponentially higher than the cost of the system itself.</p><p><strong>Understanding Dependability:</strong></p><p>Dependability, in the context of computer systems, reflects the trustworthiness of a system. It’s not only about functionality but about the amount of confidence users have that the system will operate as expected without ‘failing.’ This trustworthiness is not easily quantifiable but is often expressed in relative terms, ranging from ‘not dependable’ to ‘ultra-dependable.’</p><p><strong>The Four Dimensions of Dependability:</strong></p><p>Dependability has many sides, encompassing four principal dimensions: availability, reliability, safety, and security. Each dimension can be broken down into simpler properties, such as integrity and confidentiality in security or correctness and timeliness in reliability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*2KZYYXLypw7OBe9QjcezZg.png" /><figcaption><strong>Source: Software Engineering Ian Sommerville, 9th Edition</strong></figcaption></figure><p><strong>Tailoring Dependability to Specific Systems:</strong></p><p>Different systems have different dependability priorities. For example, an insulin pump system places a premium on availability, reliability, and safety, while a wilderness weather system emphasizes availability and reliability to minimize repair costs. The patient information system, dealing with sensitive data, prioritizes security.</p><p><strong>Beyond the Basics: Other Dependability Properties:</strong></p><p>In addition to the main dimensions, other properties contribute to a system’s dependability, which include repairability, maintainability, survivability, and error tolerance. Each of these plays a role in minimizing the impact of failures and adapting to evolving requirements.</p><p><strong>Challenges and Costs of Enhancing Dependability:</strong></p><p>Enhancing dependability comes with challenges and costs. Designing verification and validation processes, implementing protection mechanisms, and configuring systems correctly are essential steps. Fault tolerance, often requiring redundant code, impacts performance and introduces trade-offs between performance and dependability. As systems approach ultra-dependability, the costs, especially in terms of validation, soar.</p><p><strong>The Interplay of Dependability and Trust:</strong></p><p>Dependability is intricately linked with trust. Users not only desire functionality but also expect systems to be dependable, especially in critical applications. Trustworthiness becomes a determining factor in user acceptance, and unreliable systems risk rejection. The relationship between trust and usefulness is explored through a personal example — the word processor used for writing this blog. While the system is not very dependable, occasional failures are tolerated due to its usefulness. Trust is compensated by frequent saves and multiple backups, highlighting the user’s proactive role in mitigating system unreliability.</p><p><strong>Four Principal Dimensions Explored:</strong></p><p><strong>1. Availability:</strong></p><p>Availability is the probability that a system will be up and running, delivering useful services to users at any given time. In a world where system failures can affect a large number of people, the availability of a system becomes crucial. The impact of a system failure on normal business operations can be crippling, making availability a linchpin in ensuring continuous service.</p><p><strong>2. Reliability:</strong></p><p>Reliability is the probability, over a given period, that a system will correctly deliver services as expected by the user. Users reject unreliable systems, and the cost of failure in critical applications can be orders of magnitude higher than the cost of the system itself. The reliability of a system is not just about correct functionality but also about delivering services consistently over time.</p><p><strong>3. Safety:</strong></p><p>Safety is a judgment of how likely a system is to cause damage to people or its environment. In applications like an insulin pump system, safety takes precedence over other dimensions. The cost of failure, in terms of endangering lives, can be catastrophic. Safety considerations become paramount, emphasizing the need for rigorous validation and verification processes.</p><p><strong>4. Security:</strong></p><p>Security is a judgment of how likely a system can resist accidental or deliberate intrusions. In an age of increasing cyber threats, the security of a system is non-negotiable. Security includes properties like integrity and confidentiality, ensuring that the system’s program and data are not damaged, and information is only accessible to authorized personnel.</p><p><strong>Dependability Beyond the Basics:</strong></p><p><strong>1. Repairability:</strong></p><p>System failures are inevitable, but their impact can be minimized if the system can be repaired quickly. Repairability involves diagnosing problems, accessing failed components, and making changes to fix them. In software, access to the source code enhances repairability, making open-source software advantageous in this regard.</p><p><strong>2. Maintainability:</strong></p><p>Systems evolve, and new requirements emerge. Maintainability is the ability of a system to adapt economically to new requirements without introducing new errors. Maintaining software usefulness involves a delicate balance, ensuring changes are cost-effective and low-risk.</p><p><strong>3. Survivability:</strong></p><p>Internet-based systems face unique challenges, and survivability becomes crucial. The system must continue delivering services even under attack or partial disablement. Strategies such as resistance to attack, attack recognition, and recovery are employed to enhance survivability.</p><p><strong>4. Error Tolerance:</strong></p><p>Considered part of usability, error tolerance reflects the system’s design to avoid and tolerate user input errors. When errors occur, the system should detect and address them, minimizing user impact. Testing for error tolerance is essential in assessing a system’s dependability.</p><p><strong>The Need for Fault Tolerance:</strong></p><p>Fault tolerance becomes imperative in developing dependable systems. Redundant code monitors system states, detects errors, and recovers from faults before failures occur. This, however, comes at a cost — additional checking affects system performance. Designers must navigate the trade-off between performance and dependability, making strategic decisions to balance both.</p><p><strong>Challenges and Costs of Dependability Enhancement:</strong></p><p>Enhancing dependability is not without challenges and costs. Developers must avoid introducing accidental errors, design effective verification and validation processes, implement protection mechanisms against external attacks, and configure systems correctly for their operating environments. Acknowledging that software is not perfect, developers include recovery mechanisms to restore normal system service quickly.</p><p>The cost of dependability is not uniform. While significant improvements in dependability can be achieved at relatively low costs through better software engineering, further enhancements become progressively more expensive. The relationship between costs and incremental improvements in dependability is illustrated, emphasizing the diminishing returns as systems approach higher levels of dependability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*vK8B8owum5KZHhEu0asbCQ.png" /><figcaption><strong>Source: Software Engineering Ian Sommerville, 9th Edition</strong></figcaption></figure><p>Testing becomes a significant cost factor in high-dependability systems. As software becomes more dependable, the number of failures decreases, necessitating an increasing number of tests to assess remaining problems. This escalating testing cost is a substantial consideration in the development of high-dependability systems.</p><p><strong>Conclusion:</strong></p><p>Dependability is the bedrock of trustworthy software-intensive systems. Balancing the need for fault tolerance, performance, and cost is a delicate dance that developers must navigate. As we continue to rely on software for critical functions, investing in dependability becomes not just a necessity but a strategic imperative.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c309e88f207c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>