i) To show that L is not a regular language, we can use the pumping lemma for regular languages. Assume that L is regular and let p be the pumping length given by the lemma. Consider the string s = a^pb^pc^p. Since |s| = 3p ≥ p, there exists a decomposition s = xyz, where |xy| ≤ p and |y| ≥ 1, such that xy^iz ∈ L for all i ≥ 0.
Since |xy| ≤ p, the substring y consists of only a's, only b's, or a combination of a's and b's. If y consists of only a's or only b's, then pumping y will either increase the number of a's or the number of b's, breaking the condition that i=1 implies j=k. If y consists of a combination of a's and b's, then pumping y will cause the number of a's and the number of b's to become unequal, again breaking the condition that i=1 implies j=k.
Therefore, we have a contradiction, and L cannot be a regular language.
ii) To show that L is a context-free language, we can construct a context-free grammar (CFG) that generates it. One possible CFG is:
S → aSc | A A → aAb | B B → bBc | ε
The production rules generate strings of the form a^ib^jc^k where i, j, and k are non-negative integers. The rule S → aSc generates strings with any number of a's and c's between a prefix of a's and a suffix of c's, while the rule S → A generates strings with an equal number of b's and c's.
The rule A → aAb generates strings with any number of a's and b's between a prefix and suffix of a's, while the rule A → B generates strings with an equal number of a's and b's. Finally, the rule B → bBc generates strings with any number of b's and c's between a prefix of b's and a suffix of c's, while the rule B → ε generates the empty string.
Since L can be generated by a CFG, it is a context-free language.