selected solutions to ex2: Q1 . If L1 is A_TM and L2 is Sigma*, then L1 is recognizable and L2 decidable, and yet the intersection (L1) is not decidable. The intersection, however, would be recognizable as the intersection of two recognizable languages (remember that a decidable language is also recognizable). Q2. Any lnguage is countable. In fact the lexicographic order showis a simple way to count any language: The first element is the least word in the lexicogrphic orer, the second is the second, and so on. Q3. Here is a machine R that recognizes HaltSomething: R = "on input (let s1,s2, s3 be the lexicographic order on Sigma*) i=0 repeat i = i+1 run M on strings s1, s2, s_i for i steps. if one of these runs halted before the ith step ACCEP. " This is a simple dovetailing idea. If iis in Haltsomething, then it is going to halt on something, say input s_a after b steps. Then in the iteration with i = max{a,b}+1 this will be detected and M will be accepted. Also, if is not in latsomething, it will never halt prematurely, and so R will never accept such an M. This shws that R is a recognizer for HaltSomething. Assume we could decide HaltSomething by a decider H. Here is a way to decide Halt_TM by a machine D. D = "on input run H on M_w (the machine that ignores its input nd runs M on w) and do the same." If in Halt_TM, then M_w will halt on all inputs, and H will accept , making D accetpt If is not in Halt_TM, then M_w will not halt on any input, and so H will reject making D reject . But since Halt_TM is not decidable, the existance of D is a contradiction, and so H does not exst, and HaltSomething is undecidable.