-1

$L = \{x \in(a,b,c,d)^* \mid -10 \leq ( |x|_a + |x|_b) - ( |x|_c + |x|_d) \leq 10 \}$

I don't have any idea. Can someone help me.

PoliteMan
  • 53
  • 5
  • 1
    I notice you've asked about 7 questions like this, about 7 different languages. I don't think it's useful to have an unending list of these types of questions. As has been suggested before (and also here), I suggest that you study our reference questions on this subject: https://cs.stackexchange.com/q/18524/755, https://cs.stackexchange.com/q/265/755. – D.W. Feb 11 '19 at 23:52
  • 1
    If you're still stuck, it would be best to show us in the question how you tried to apply those techniques, what progress you made, and where you got stuck. We'd like you to try those routes before asking here. See also here for tips on asking questions about exercise problems. – D.W. Feb 11 '19 at 23:54
  • Sinc you "don't have any idea", here is a hint. Can you construct PDA for a simpler language ${x \in{a,c}^* \mid -1 \leq |x|_a-|x|_c \leq 1 }$? For an even simpler language ${x \in{a,c}^*\mid |x|_a-|x|_c =0 }$? As requested by @D.W., it will be nice of you to show your work. – John L. Feb 12 '19 at 01:32
  • https://imgur.com/7aKDFEl I change a little bit. Now should be good – PoliteMan Feb 12 '19 at 02:29
  • so for my task in this question it will be the same for a, b I will put away one stacking symbol, let's say "AB" (this "a" in your example), and for c, d (your "c" from example) "CD" will be stacked and at the end the fork will have to have an additional 9 states to remove the CD and 9 additional states to remove AB? – PoliteMan Feb 12 '19 at 02:36
  • @Apass.Jack + in this my image I forgot add q2 -> q3 (epsilon , z0 : z0) and q2 -> q5 (epsilon , z0 : z0) + in q1.. c, z0; z0c should be in reverse c, z0; cz0. I think is perfect now – PoliteMan Feb 12 '19 at 03:08
  • Could you copy and past your comments that show your work to the question? It is more or less a requirement to show your progress in the question when a homework-like question is asked. Please note comments are considered as dispensable by this site. Comments are not assumed to read by most of readers nor by search engines. – John L. Feb 13 '19 at 06:09
  • @Apass.Jack I passed the exam. Thank you very much for your help. I had L1 = bin(n)bin(2n + 3) and complement L2 = |w|_1 = |w|_0 mod 3 to guess regular, context-free or neither and prove it. + parsers. Thanks for your time – PoliteMan Feb 13 '19 at 23:30
  • @PoliteMan Cool. – John L. Feb 13 '19 at 23:37

1 Answers1

0

If anyone would be interested, here is my pda to $L = \{x \in(a,b,c,d)^* \mid -1 \leq ( |x|_a + |x|_b) - ( |x|_c + |x|_d) \leq 1 \}$

enter image description here

PoliteMan
  • 53
  • 5