• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

DisplayMonk

Solution to your problem

  • Home
    • Privacy Policy
  • About Us
  • Repair Tips
  • Schematics Bios
  • Course
  • Online Jobs
  • Tools
  • Enquiry / Contact
Home » SYCS Mumbai University theory of computation practicals solutions updated

SYCS Mumbai University theory of computation practicals solutions updated

SYCS Mumbai University Theory Of Computation practicals solutions and notes on demand updated

April 15, 2023 by displaymonk

SYCS Theory Of Computation Practicals Mumbai University

below are practicals and their solutions of Theory of Computation for Mumbai University SYBsc Computer Science updated complete list.

Aim : Write a program for tokenization of given input

Code:

my_text = “”” India is a land of various cultures and heritage. It is the seventh-largest country by area and the second-most populous country globally. The peacock is India’s national bird, and the Bengal tiger is the country’s national animal. The national song is named Vande Matram and is written by Bankimchandra Chatterji. “””

print(my_text.split(‘. ‘))

Output :

Aim : Write a program for generating regular expressions for regular grammer.

Code :

import re

s = ‘A computer science book for students’

match = re.search(r’students’, s)

print(‘Start Index:’, match.start())

print(‘End Index:’, match.end())

Output :

Aim : Write a program for generating derivation sequence / language for the given sequence of productions.

Aim : Design a Program for creating machine that accepts the string always ending with 101.

Code :

arr = [1, 1, 1, 4, 1, 1, 1, 5, 5, 5, 3, 8 ,2 ,3 ,4]

size = len(arr)

temp = 0

print(“The concecutive ones are: \n”);

for i in range(size – 2):

    if arr[i] == 1 and arr[i] == arr[i + 1] and arr[i + 1] == arr[i + 2]:

          temp = temp +arr[i]

print(“Number of 1’s are”,temp);

Output :

Aim : Design a program for accepting decimal number divisible by 2.

Code :

def stateq0(n):

                if (len(n)==0):

                                print(“Divisible by 2”)

                else:

                                if(n[0]==’0′):

                                                stateq0(n[1:])

                                elif (n[0]==’1′):

                                                stateq1(n[1:])

def stateq1(n):

                if (len(n)==0):

                                print(“Not divisible by 2”)

                else:

                                if(n[0]==’0′):

                                                stateq0(n[1:])

                                elif (n[0]==’1′):

                                                stateq1(n[1:])                   

n=int(input())

n = bin(n).replace(“0b”, “”)

stateq0(n)

Output :

Aim : Design a program for creating a machine which accepts string having equal no. of 1’s and 0’s.

Code  :

Output :

Filed Under: university students updated material Tagged With: SYCS Mumbai University theory of computation practicals solutions updated

Primary Sidebar

Search On Website

Laptop Desktop Chip Level Help Guide

  • Windows 10 Restarts After Shutdown

    Windows 10 Restarts After Shutdown

    March 24, 2025

  • T.VST59.031 Firmware Software

    T.VST59.031 Firmware Software Download Latest

    March 18, 2025

  • Mobile and Tablet Repairing Institute Class in Ratnagiri, Maharastra

    Mobile and Tablet Repairing Institute Class in Ratnagiri, Maharastra

    December 14, 2024

  • Laptop and Computer Repairing Institute in Ratnagiri, Maharastra

    Laptop and Computer Repairing Institute Class in Ratnagiri, Maharastra

    December 14, 2024

  • pm-modi-lic-sakhi-yojana

    LIC’s Bima Sakhi Yojana 2025: How To Apply?

    December 12, 2024

Footer

Mobile Repair

We do mobile repairing.

Learn more about mobile repairing service.

Laptop Repair

We laptop repairing.

Learn more about laptop repairing service.

TV Repair

We do TV repairing.

Learn more about tv repairing service.

Copyright © 2025 · DisplayMonk

  • Home
  • About Us
  • Repair Tips
  • Schematics Bios
  • Course
  • Online Jobs
  • Tools
  • Enquiry / Contact