This Group: Zeen, Shaurya, Vardaan, Navan, and Justin

HACK 1

Please write a short 1-2 sentence explanation describing the difference between decidable and undecidable problems. Make sure to provide at least one example of each.

Decidable Problems are problems that algorithms can return an output for all inputs, and an example of this can be checking to see if a number is even or odd. Undecidable Problems are problems that algorithms can not solve very simply, and they are usually algorithms with exponential or factorial efficiencies.

import random # Decidable Problem

number = random.randint(1,10)
print("The Number is", number)

if number % 2 == 0:
    print("This is an Even Number")
else:
    print("This is an Odd Number")
The Number is 4
This is an Even Number
import random

number = 1

while number == 0:
    print(number)
    number = number + 1

if number > 0:
    print("The value of Number is greater than 0")
The value of Number is greater than 0

HACK 2

Which of the following is a 3 step algorithm?

A. 2 x 6 x 8

B. 4^5

C. (3 x 8)^2

D. None of the above

E. All of the above

My Answer: C

Explanation: This is the correct choice because this answer has two integers that are being multiplied together, but then it is being squared so this will take a 3 step algorithm. It can't be none of them because option C is true, and all of the above can not be true because option B is exponential. Option C is a quadratic however. The first step would be 3 x 8, the second step is getting a value of 24, and the third step would be squaring that value.

HACK 3

Rewrite this JavaScript Code in a More Efficient Way (Hint: Use Binary Search)

function peak_finder(array){
  let counter = 0
  let peak = 0
  let peak_index =0
  while (counter <= array.length){
    console.log(counter)
  if (counter === 0){
    if (a[0]>=a[1]){
      peak = a[0]
      peak_index = counter
      counter = array.length
      return `The ${counter-1} indexed number, ${peak} is a peak`
    }else{
      counter+=1
    }
  }else if(counter === array.length-1){
     if (a[array.length-1] >= a[array.length-2]){
     peak = a[array.length-1]
     peak_index = counter
     counter = array.length
     return `The ${counter-1} indexed number, ${peak} is a peak`
     }
   }else{
      if (a[counter]> a[counter+1] && a[counter]> a[counter-1]){
      peak = a[counter]
      peak_index = counter
      counter = array.length
      return `The ${counter-1} indexed number, ${peak} is a peak`
    }else{
      counter += 1
    }
  }
}
}
function peak_finder2(array) {
    if(array.length) == 0:
       return  `Array cannot be empty`
    else {
        if(array.length == 1)
        return array[0]
    }
    else {
        let mid_index = Math.floor(array.length*0.5)
    }
    if (array[mid_index +1]>array[mid_index]) {
        return peak_finding(array.slice(mid_index + 1 ))
    }
    else if (array[mid_index -1]>array[mid_index])
        new =  array.reverse().slice(mid_index+1).reverse()
        return peak_finding(new)  
    else {
        return array[mid_index]
    }      
}
  Cell In[43], line 1
    function peak_finder2(array)
             ^
SyntaxError: invalid syntax
array = [3, 1, 4, 5, 2]

function peak_finder(array)
    let counter = 0
    let peak = 0
    let peak_index = 0

if (counter === 0)
    if (a[0]>=a[1])
      peak = a[0]
      peak_index = counter
      counter = array.length
    else:
      counter += 1
    if (counter >= peak_index)
      array.append(r)
      peak = a[1]
      counter = array.array
else:
  counter += 1

peak_finder()
1, 2, 3, 4, 5
2 checks to find 4

I did not really understand what we were supposed to do here with this code because an array was not really provided. I was not really sure how I was supposed to implement binary search here, additionally, the code was in a lot of different places, and I was not really sure what was going on, but I knew that it was trying to sort out an array.

HACK 4

Rewrite this Python Code in a More Efficient Way

def merge_sort(data):
    if len(data) <= 1:
        return
    
    mid = len(data) // 2
    left_data = data[:mid]
    right_data = data[mid:]
    
    merge_sort(left_data)
    merge_sort(right_data)
    
    left_index = 0
    right_index = 0
    data_index = 0
    
    while left_index < len(left_data) and right_index < len(right_data):
        if left_data[left_index] < right_data[right_index]:
            data[data_index] = left_data[left_index]
            left_index += 1
        else:
            data[data_index] = right_data[right_index]
            right_index += 1
        data_index += 1
    
    if left_index < len(left_data):
        del data[data_index:]
        data += left_data[left_index:]
    elif right_index < len(right_data):
        del data[data_index:]
        data += right_data[right_index:]
    
if __name__ == '__main__':
    data = [9, 1, 7, 6, 2, 8, 5, 3, 4, 0]
    merge_sort(data)
    print(data)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
data = [9, 1, 7, 6, 2, 8, 5, 3, 4, 0]

print("Before Sorted List:", data)
print("The Length of the list is", len(data))

data.sort()

print("After Sorted List:", data)
Before Sorted List: [9, 1, 7, 6, 2, 8, 5, 3, 4, 0]
The Length of the list is 10
After Sorted List: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

This Problem was pretty simple because I could just use the sort() function which made it really easy for me to do this algorithm instead of having to sort it with the other piece of code. This method saves a lot of time, and it is not as overwhelming to look at, it also is easy for other users to understand.

HACK 5

Rewrite this Python Code in a More Efficient Way

def heap_permutation(data, n):
    if n == 1:
        print(data)
        return
    
    for i in range(n):
        heap_permutation(data, n - 1)
        if n % 2 == 0:
            data[i], data[n-1] = data[n-1], data[i]
        else:
            data[0], data[n-1] = data[n-1], data[0]
    
if __name__ == '__main__':
    data = [1, 2, 3]
    heap_permutation(data, len(data))
[1, 2, 3]
[2, 1, 3]
[3, 1, 2]
[1, 3, 2]
[2, 3, 1]
[3, 2, 1]
if __name__ == '__main__':
    data = [1, 2, 3]
    heap_permutation(data, len(data))
[1, 2, 3]
[2, 1, 3]
[3, 1, 2]
[1, 3, 2]
[2, 3, 1]
[3, 2, 1]
data = [1, 2, 3]

heap_permutation(data, len(data))
[1, 2, 3]
[2, 1, 3]
[3, 1, 2]
[1, 3, 2]
[2, 3, 1]
[3, 2, 1]

I am not exactly sure why just deleting the top part of the code basically just gives us the same output. My guess is that heap_permutation is already its own parameter, so this means that it is able to shuffle all the different possibilities with the data

Extra

I want to see what else I can do with the heap_permutation parameter

small_password = [0, 1]

heap_permutation(small_password, len(small_password))

password = [1, 2, 3, 4, 5, 6]
# Dont want cell output too big
[0, 1]
[1, 0]
dice_roll = [1, 2, 3, 4, 5, 6]

heap_permutation(dice_roll, len(dice_roll))
[1, 2, 3, 4, 5, 6]
[2, 1, 3, 4, 5, 6]
[3, 1, 2, 4, 5, 6]
[1, 3, 2, 4, 5, 6]
[2, 3, 1, 4, 5, 6]
[3, 2, 1, 4, 5, 6]
[4, 2, 3, 1, 5, 6]
[2, 4, 3, 1, 5, 6]
[3, 4, 2, 1, 5, 6]
[4, 3, 2, 1, 5, 6]
[2, 3, 4, 1, 5, 6]
[3, 2, 4, 1, 5, 6]
[4, 1, 3, 2, 5, 6]
[1, 4, 3, 2, 5, 6]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