# It’s all in the algorithms.

--

Algorithms are specific steps by the computer to complete a computation. So algorithms are better than others even if they produce equal results. Generally the fewer steps it takes to compute, the better it is, though sometimes we care about the other factors like how much memory it uses. The most interesting part of the things we saw in class for me was different kinds of sorting. We started with learning traits of algorithm and knowing the computer architecture. Three important things we learnt were, ISA, MA and SD.

Instruction set architecture (ISA) is basically talking to the computer and instructing it in a language that it understands. Micro Architecture is how ISA will be implemented in computer and the system design comprises of the entire computer system.

Coming back to algorithms,sorting in one of most stories algorithmic problems in all of CS. Computer sorts all the time-looking for the cheapest airfare or arranging email by recents. Sorting takes place in a way such that if there.is an array of numbers. It searches for smallest number and arranges accordingly and goes on swapping places till we get a sorted list in an ascending or descending manner. This is just one way of sorting an algorithm. This is counting sort which is a very basic sorting algorithm. There are different way of representing an algorithm. There is high level description, pseudocode and flowchart. High level description is where we explain the whole code verbally with a brief. Pseudocode is where we don’t write the exact algorithm but it resembles to the code but in a simplified language. Flow chart is a way of expressing the code in sentences one by one showing how it will progress.

The pseudo code for representing the above counting sort will be

Function of selectionSort(array)

For i = 0 to end of array

Smallest = i

For index = i + 1 to end of array

If array item index < array item smallest

Smallest = index

End if

Next

Swap array items at index and smallest

Next

Return array

In this we can see that there are for loop inside a for loop. So if we want to sort n items, we have to loop n times, inside of which we loop n times, for a total of roughly N times N loops or n². This relationship of input size to number steps of algorithm takes to run characterizes the complexity of an algorithm. Basically, it gives an approximation of how fast or slow an algorithm is going to be. This order of growth is written as big O notation. This is the basic sorting algorithm that I looked to understand how sorting actually works. Through the class we learnt a number of different sorting algorithm e.g bucket sort, merge sort and bucket sort. We were each asked to present one algorithm and I feel that helped us help each other learning by doing. We solved using these sorting methods manually and came across where we are getting stuck and how we could solve it properly.

We were told to write a code based on any search two search algorithms.

We then studies about amortized analysis where we first counted the cost of the algorithm and then the arithmetic steps. At first it was confusing for me to know how many steps is it taking and how should I count. But I understood how to do it finally. We then gave random input of different sizes and found out the average time complexity in the best and worst case.

We then started working in groups. We choose the topic of Amazon Fulfilment Centres and we were trying to find out what algorithms helps the pickers to pick the item and how we can optimise it. We faced a lot of problems during this assignment and felt really lost in between. Still, we didn’t want to stop and we didn’t lose interest. I was overwhelmed and tensed but at the same time I was excited to know how far we could reach in this complex maze of amazon algorithm.

The first and main problem was we didn’t have any field to visit. We were relying on secondary research. I looked at a lot research papers and lots of videos trying to find out how exactly the AFC works. I tried to find as many insights as I could from these papers and videos. We had a long discussions on the working of the AFC in different steps and Ananya came up with a beautiful flow chart that helped throughout out process. Since we HCD majors and the way we look at research is very different from what we did this time. We would first make a persona, make the journey map and then come up with the system. This time we already had the system we wanted to know how it exactly works. The main aim was to reduce the efforts on pickers and hence we decided to look at pickers as people and not machine. And the main aspects we chose was time and distance.

Initially we were completely lost as to how to go ahead. We completely stuck and really had to scratch our heads to go further. We went and sat with Gaurav and he gave us a direction. We mapped out all the process that were involved in the process and also what affects the effort taken by the picker. He helped us with playing a game called if and then where i wrote if statements and Ananya wrote then statements and we put them together randomly and we got different situations and it all started making sense and we started thinking that, oh! This is a possibility that could be taken into consideration. We found out variables and constants. We did have to assume a lot of things as we didn’t have sure shot information on the topic. We then arranged each attribute in the order of hierarchy and worked mainly with the attributes we thought were the most important.

The thing that I learnt from this was I need to look at a zoomed out broader picture of any system and thinking about very small minute details. For example, we looked at each shelf in aisle and also looked at how much time it will take to search for the product in each shelf according to the position and height of the shelf.

We did try to talk to people from Amazon, but it was not easy to get information from them as even they have ethics involved.

Even though we had limited information, I feel we did the most of it. And tried our best to get close to at least the existing algorithm of amazon. While writing the code also we had issues on how to make the picker move simultaneously and how do we assign pickers with items etc. But we successfully overcame all of this and I feel we gave our 100% trying to give justice to whatever we learnt and whatever we could apply.

We had a lot of ups and downs in the course. Sometimes we loved it. Sometimes we were struggling to even understand the concepts. Sometimes we were completely lost. But overall it was the best class I have ever had at Srishti as everything I learnt was new and hoping I could use all this in my future.