KIRAN PERVEEN

(Student of MS(CS) at Comsats University Islamabad )

Registraction # SP19-RCS-028

Character: Captain Marvel

Acknowledgement

At first, I would like to thank my teacher Dr. Muaz Ahmed Niazi for teaching us Theory Of Computation and guiding us along the course

Achievements

The condition for machine selection are it should be Context free language and non-Regular language

Strings for this machine are:

  • Accepts: 0110,001100,000111111000...
  • Rejects: 1000, 00111,00001,1110

In this course I (Kiran Perveen) have implemented the language that is not CFL and nor RE. The language is 0a1b0c such that a + c = b . I have proved for this language which describe that it is not a context free and regular language. Where 0 is sub-string of a and b 1 is sub string of b and set of strings belong to this language consists of characters 0 and 1 . In this language, two strings are provided 0 and 1 where in these strings the string will be accepted when sum of and c is equal to the value of b. The language says that length of a and C are equal while b should be double then the sum of a and c then we consider this non-context free language. I have worked on the LATEX to make the report of project. Overall, I have learned to build logics, model designing and how to handle complex problems like Turing machines. The basic achievements of the course are ,learning logic building, model designing, Theorem proof, handling with complex problems, like implementing turing machine on objects. I have have also learned to game development in Unity3d. My development and designing skills has been improved greatly. As throughout the semester the course were practical which will be helpful in future as well as in my Research. I have designed the theme of Avengers and added all the functionality of the theme, and designed 3d model on blender and also the animation of the models in unity. Furthermore, I have learned how to write C# scripts for the objects and have designed objects for the project too. Also, to improve the graphics of the objects.

Turing Machine model for L = { 0a1b0c : a + c = b }

(Tool: JFlap)

Language Proof

L = { 0a1b0c : a + c = b }

Proof:

Suppose L = aibjai : i 6= j is a CFL. Let n be the integer in Ogden’s lemma, let u = anbn + n!an , and designate the first n positions of u as the distinguished positions. Then u = vwxyz, where wy contains at least one from the first group of a’s and vwixyiz L for every i ≥ 0. The only case in which considering vw2xy2z does not easily produce a contradiction is that in which w contains ka0s from the first group for some k > 0 and y contains ka0s from the second group. In this case, however, we can let i = 1 + n!/k so that vwixyiz = an+n! bn+n! an+n!. This string is not in L. This contradiction implies that L is not a CFL.


Simulation of Turing Machine for Accept and Reject String


Jflap Simulation for Language = { 0a1b0c : a + c = b } Accept String

Jflap Simulation for Language = { 0a1b0c : a + c = b } Reject String

Transition Table for Turing Machine

VIDEOS (J flap Simulations)

Jflap Simulation Video for Language = { 0a1b0c : a + c = b } when String is Accepted


Jflap Simulation Video for Language = { 0a1b0c : a + c = b } when String is Rejected


Accept and Reject State Screen-Short

Accept String for Language

L = { 0a1b0c : a + c = b }

Enter the Input String 001100. 000111111000


Reject String for Language

L = { 0a1b0c : a + c = b }

Enter the String 01110, 0001001


Watch Videos

Turing Machine Video for Accept String for

L = { 0a1b0c : a + c = b }

Turing Machine Video for Accept String for

L = { 0a1b0c : a + c = b }

MODELING (blender)

This is the 3D model of Captain Marvel. I have made this model in Blender.

This is the 3D model of Sun.

This is the 3D Mercury.

This is the 3D Model of Earth.

This is the 3D Model of Venus

This is the 3D Model of Mars

This is the 3D Model of Jupiter

This is the 3D Model of Uranus

Discription of Language And Turing Machine

  • I have implemented the language that is not CFL and nor RE. The first language is 0a1b0c such that a + c = b . We have proved for this language which describe that it is not a context free and regular language. Where 0 is sub-string of a and b 1 is sub string of b and set of strings belong to this language consists of characters 0 and 1 . In this language, two strings are provided 0 and 1 where in these strings the string will be accepted when sum of and c is equal to the value of b. The language says that length of a and C are equal while b should be double then the sum of a and c then we consider this non-context free language.
  • The Turing Machine of this language which is designed my us consists of 9 states. Q0 is an initial state of this Turing machine and Q9 is final state of Turing machine such that transition process begin from initial state if it ends at final state then the string of this language is acceptable. Now, let’s start of Turing machine, it firstly check the length of 0,1 in equal manners and eliminate all 0’s with delta and replace 1 with X. Once this process is done then it matches length of X’s with length of c’s and finally if all character of string given to Turing machine replaced with delta then it is acceptable at final state I otherwise it is rejected and according to our game theme it is a case of rejected.

Unity terms code with links from unity Documentation

Audio Source

A representation of audio sources in 3D. An Audio Source is attached to a GameObject for playing back sounds in a 3D environment. In order to play 3D sounds you also need to have a AudioListener. The audio listener is normally attached to the camera you want to use. Whether sounds are played in 3D or 2D is determined by AudioImporter settings. You can play a single audio clip using Play, Pause and Stop. You can also adjust its volume while playing using the volume property, or seek using time. Multiple sounds can be played on one Audio Source using PlayOneShot. You can play a clip at a static position in 3D space using PlayClipAtPoint.

For more detail: https://docs.unity3d.com/ScriptReference/AudioSource.html

Material

This class exposes all properties from a material, allowing you to animate them. You can also use it to set custom shader properties that can't be accessed through the inspector (e.g. matrices).

For more detail: https://docs.unity3d.com/ScriptReference/Material.html

AddListener

Add a non-persistent listener to the Unity Event. Use this to add a runtime callback. Adding multiple identical listeners results in only a single call being made.

For more detail: https://docs.unity3d.com/ScriptReference/Events.UnityEvent.AddListener.html

GetKey

Returns true while the user holds down the key identified by name. GetKey will report the status of the named key. This might be used to confirm a key is used for auto fire. For the list of key identifiers see Input Manager. When dealing with input it is recommended to use Input.GetAxis and Input.GetButton instead since it allows end-users to configure the keys.

For more detail: https://docs.unity3d.com/ScriptReference/Input.GetKey.html

Creates a game object with a primitive mesh renderer and appropriate collider.

For more detail:https://docs.unity3d.com/ScriptReference/GameObject.CreatePrimitive.html

GetComponent

Returns the component of Type type if the game object has one attached, null if it doesn't. GetComponent is the primary way of accessing other components. From JavaScript the type of a script is always the name of the script as seen in the project view. You can access both built-in components or scripts with this function.

For more detail: https://docs.unity3d.com/ScriptReference/GameObject.GetComponent.html

SetActive

Activates/Deactivates the GameObject, depending on the given true or false value. A GameObject may be inactive because a parent is not active. In that case, calling SetActive will not activate it, but only set the local state of the GameObject, which you can check using GameObject.activeSelf. Unity can then use this state when all parents become active. Deactivating a GameObject disables each component, including attached renderers, colliders, rigid bodies, and scripts. For example, Unity will no longer call the Update() method of a script attached to a deactivated GameObject. OnEnable or OnDisable are called as the GameObject received SetActive(true) or SetActive(false).

For more detail: https://docs.unity3d.com/ScriptReference/GameObject.SetActive.html

LoadSceneAsync

Loads the Scene asynchronously in the background. The given Scene name can either be the full Scene path, the path shown in the Build Settings window or just the Scene name. If only the Scene name is given this will load the first Scene in the list that matches. If you have multiple Scenes with same name but different paths, you should use the full Scene path in the Build Settings.

For more detail: https://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.LoadSceneAsync.html

Reference

Introducing the Theory of Computation

Wayne Goddard Page # 119

Language Proof