Skip to main content
Filter by
Sorted by
Tagged with
Advice
0 votes
3 replies
150 views

I designed Turing machine that accepts the input over the language: {a^i b^j | j is divisible by i, i ≥ 2, j ≥ 2} This Turing machine should accept and reject the stings as following: aabbbb | ...
Badar Ul Islam's user avatar
2 votes
0 answers
94 views

I'm trying to implement some logic within a system of microcontroller IRQs and event callbacks, that fundamentally require the use of a complex state machine in order to behave correctly. Regular ...
AJMansfield's user avatar
  • 4,222
1 vote
1 answer
1k views

I am trying to solve the following Turing machine challenge: The number choice function The number choice function is defined as follows. INPUT: a sequence 𝑘, 𝑥1, 𝑥2,..., 𝑥𝑛 where 𝑘 is a ...
Gwin Lim's user avatar
1 vote
1 answer
87 views

When specifying required versions of a dependency in npm, we can specify ranges of versions. For example: 1.2.7 || >=1.2.9 <2.0.0 Specification: https://github.com/npm/node-semver?tab=readme-ov-...
carl's user avatar
  • 13
0 votes
1 answer
131 views

I have a large set of data, 4000 rows+. each row is associated with metric data that is collected daily. Metric table is at over 1.1 million rows. for example: Item table: Id Item 1 Hello 2 World ... ....
Greg's user avatar
  • 151
1 vote
1 answer
248 views

I have this finite automata (FA) and want to write its language. I think its L={x E {0,1} | {x with subset of 00 and ends in 1} and it would help to know what the type of FA it is. I think it's a DFA ...
cool cat's user avatar
0 votes
0 answers
34 views

I recently stumbled upon an optimization problem while working on structural analysis. While I'm confident in my MATLAB skills as an aerospace engineer, I must admit my theoretical knowledge in ...
user23509645's user avatar
0 votes
1 answer
245 views

Just learned about DPDA's on my Theory of computation class. Professor gave us a semester task to create a deterministic pushdown automaton state diagram that is able to accept all strings multiples ...
Santiago Lemus Vallejo's user avatar
1 vote
1 answer
98 views

How to find the grammar of this language: La = {ww^r: w e {0,1}^*, w ends with 1} ? r: is reverse Here is my solution: S -> 0S0|1S1| 0|1|E(epsilon) What can I change here or is the solution the ...
sourga bah's user avatar
0 votes
1 answer
179 views

In this Puzzling SE post, there's a maze with infinitely nested inside itself. Inspired by this, consider the following graph problem: Setup: A graph G with vertices V and undirected edges E And ...
Davis Yoshida's user avatar
0 votes
2 answers
578 views

I am trying to solve this popular problem: "Given an integer array, divide the array into two subsets, A and B, while respecting the following conditions. the intersection of A and B is null. ...
Jonathan's user avatar
  • 1,966
2 votes
1 answer
5k views

I'm trying to solve this challenge: Design a DFA for all binary strings having an even number of 0's or containing exactly two 1's I'm a bit confused with this question. I had tried to come up with ...
just coding's user avatar
0 votes
1 answer
622 views

The DFA for even numbers of and b is this DFA for even numbers of a and b but the DFA of even and equal number of a and b is not available L={\epsilon,aabb,abab,baba,bbaa,aaaabbbb,aabbaabb,bbaabbaa,...
SOURAV's user avatar
  • 1
0 votes
0 answers
92 views

I’m doing research on the models of computation and how they work and what they are. I would like someone To help me understand what these are and help me find books or anything to research them. I’...
Lukar's user avatar
  • 11
-2 votes
1 answer
41 views

Let FT be the class of all finite languages over {0,1}. Suppose FL is countable, so we can enumerate all members of FL as FL = {L_0, L_1, L_2, ...} Meanwhile, we also enumerate all strings over the ...
Cyberpunk2020's user avatar
-2 votes
1 answer
75 views

I got this challenge: Given 𝐿 = { 𝑤 ∊ {0, 1}* : 01 is a substring of 𝑤 } Show 𝐿 compliment is regular. My understanding is that a DFA for the compliment of this language would need to reject 01 ...
sukhi's user avatar
  • 9
0 votes
1 answer
1k views

I was practicing NFA (Non-Deterministic-Finite-Automata) designing and converting them to DFA. Then suddenly I got a doubt, as all the examples I have seen for conversion had NFA's initial state with ...
Kush_Uttam's user avatar
0 votes
1 answer
139 views

It seems to be common practice in Deep Q-learning to have the target network trailing the main network, and syncing them every 100 or so steps, but I am not clear as to why that is. The best ...
goodusernamf's user avatar
0 votes
1 answer
233 views

We've learned how to use NFA to prove that closure property, but how could we do that without any help of using the conception of NFA? How to construct a DFA that could solve this problem? (so ...
Jossy_keepgoing's user avatar
3 votes
1 answer
192 views

I'm looking for people with some algorithmic knowledge who can help me out with this. I'm currently programming a constrained tree search in java, where I want to have a certain amount of leaf nodes ...
ChomskyEnjoyer's user avatar
0 votes
0 answers
33 views

In the past, I defined most often new names for new variables in python. Nevertheless, reusing names may sometimes come with cleaner code like in this example. With new names: this_path = "/home/...
MaestroGlanz's user avatar
0 votes
0 answers
31 views

This DFA accepts any string over the alphabet {a, b} where the number of 'b's, if present, is even. An example of strings it accept: Accepted: a aa bb aaa abb bab bba aaa abb bab bba aaaa aaab aabab ...
Kinglouis01's user avatar
-1 votes
1 answer
194 views

How do we show that the following language is undecidable. (https://i.sstatic.net/In68J.png) I am not really sure where to start for the proof. Probably using one of ATM, HALTTM, or ETM to help ...
roxieM's user avatar
  • 1
0 votes
1 answer
134 views

dfa So I have an assignment to find out which language this dfa accepts. I found many different words that the DFA accepts for example: w1=0 w2=101 w3=1111 w4=100011 w5=11001 So my problem is that I ...
dthnick's user avatar
0 votes
2 answers
144 views

I've just learned that additive operation is faster than multiplicative operation in C. Therefore, I'm curious whether (a+b)*c would be calculated faster than a*c+b*c ?
royal grasshopper's user avatar
0 votes
1 answer
303 views

Prove that the following problem is undecidable by a reduction from the halting problem: “Does a given Turing Machine M accept any string of form a^2k for k ≥ 1?” I'm having trouble understanding the ...
Suleyman Kiani's user avatar
0 votes
0 answers
47 views

I was working on a problem, where I was proving that for someone taking random-sized steps in 2-D, the relation between the total distance covered and the square root of the number of steps is linear. ...
Belal Bahaa's user avatar
-2 votes
1 answer
41 views

I found this question in a German math textbook [Konkrete Mathematik (nicht nur) für Informatiker]. I know that this is not possible but I can not come up with a convincing argument. I think there are ...
wejaeger's user avatar
1 vote
1 answer
230 views

Suppose I have an unsorted array A of n integers and an integer b. I want to write an algorithm to compute the frequency of b in A (i.e., count the number of times b appears in A) using divide and ...
Uzair Siddiqui's user avatar
0 votes
0 answers
104 views

The grammar is as follows: R -> R + T | T T -> T F | F F -> F * | P P -> a | b Terminals: {+, *, a, b} Non-terminals: {R, T, F, P} My understanding is that as there are no common prefixes ...
mon's user avatar
  • 25
-2 votes
1 answer
607 views

I am a part of a team of 5 developers that work with gathering data, transforming, analyzing and predicting data in Azure Databricks (basically a combination of Data Science and Data Engineering). Up ...
Joakim Torsvik's user avatar
2 votes
1 answer
462 views

There is this proof that I thought of that I am not quite sure if it's valid or not. Suppose you had to prove the nonregularity of the following language: A = { 0^n 1^n 2^n | n>= 0 } The proof I ...
Mr Bones's user avatar
2 votes
1 answer
685 views

In our course of Theory of Computation, we have done the proof for closure of regular languages(L1, L2) under intersection, union and complement. But their closure under concatenation(L1L2) and star(...
Aakash Tiwari's user avatar
1 vote
1 answer
563 views

How to construct unrestricted grammar that generates L = {a^ib^j c^k^d^l : i not equal to k AND j not equal to l}. a is to the power of i, 'b' raised to the power of j, 'c' raised to the power of k, '...
newman's user avatar
  • 21
-1 votes
1 answer
611 views

(https://i.sstatic.net/lU278.png) Why option C is also not correct?
Naina's user avatar
  • 11
1 vote
1 answer
736 views

From many textbooks about computability, I see how we define equivalent turing machines as follows: Two turing machines TM1 and TM2 are equivalent <=> L(TM1) = (TM2) where L(TM1) is the ...
Neil Zhang's user avatar
2 votes
0 answers
231 views

I have been asked to construct a NPDA that accepts the following language L = {anb2n : n ≥ 1}. I have completed the written assignment portion and after testing it thoroughly i am sure that my NPDA is ...
hello_people's user avatar
0 votes
1 answer
3k views

I am currently enrolled in the undergraduate version of Theory of Computation at my university and we are discussing Pushdown Automata, Turing Machines, and the Church-Turing Thesis. In our homework ...
anthonyvn's user avatar
2 votes
2 answers
263 views

Given that the C++ template system is not context-free and it's also Turing-Complete, can anyone provide me a non-trivial example of a program that makes the g++ compiler loop forever? For more ...
Otávio Augusto Silva's user avatar
-1 votes
1 answer
338 views

I am looking for an algorithm that would removing the symbols that occur at odd positions, so keeping only the ones at even positions, and join the kept symbols into one, uninterrupted output sequence....
Kieran Anderson's user avatar
2 votes
2 answers
919 views

Example input: 010101, output: 000 Example input: 10011, output: 101 Example input: 11101101, output: 1110 While drawing a state diagram for this problem, I am confused by how to merge the input ...
Kieran Anderson's user avatar
0 votes
1 answer
4k views

S→aAa | bBb |€, A→C|a , B→C|b , C→CDE | € , D→A|B|ab In this i think E,C,D are useless but if we remove those, then there is no point in this question, so I'm stuck about what are useful and what are ...
drake's user avatar
  • 1
1 vote
0 answers
111 views

I found this section (3.2) of SICP pretty vague on the exact difference between an environment and a frame. Sometimes it seemed to use them interchangeably, and sometimes it labelled them as distinct ...
jim's user avatar
  • 1,083
0 votes
2 answers
5k views

Problem from page 5 of this pdf. Give an NFA that recognizing the language (01 U 001 U 010)* I think this is wrong because there should be an additional start state (accepting) going to state 1 for ...
learner's user avatar
  • 131
0 votes
1 answer
109 views

This is my implementation of the inversion counting algorithm using a divide and conquer approach, the problem i am having is it keeps saying there is a type error, cannot unpack non-iterable int ...
Beatrice z.jiang's user avatar
2 votes
2 answers
305 views

Let us say we have an algorithm with multiple steps and each of those steps can be parallelized. Given a certain number of CPU cores, is there a mathematically optimal way to split things up on the ...
user3443615's user avatar
0 votes
0 answers
45 views

Why it is impossible to specify a single DFA that accepts 𝐿≡∪𝑛∈N𝐿𝑛, although an individual machine can be constructed for each 𝑛?
Aries's user avatar
  • 1
1 vote
1 answer
262 views

[I'm on new grounds here, there might be some ambiguities] Consider the recursor (which is a generalization of primitive recursion over higher types) R_\sigma A B 0 = A R_\sigma A B (S(C)) = B(R_\...
Jii's user avatar
  • 113
0 votes
2 answers
542 views

I have a vague understanding of undecidability. I get it that undecidability is that for a problem there exists no algorithm or the Turing machine will never halt. But I cant just visualize it. Can ...
ajey muthiah's user avatar
-2 votes
2 answers
6k views

I am little confused about either can we make pda for a^n b^n+1 language ? As to my knowledge pda can be made only for CFL. Does a^n b^n+1 is cfl or not? Plz help
Muneeb's user avatar
  • 53

1
2 3 4 5
13