Let (S, #, *) be an algebraic structure where # and * are binary operations with identities on the set S. Let (G, +) be an abelian group. We consider the functional equation (i) % MathType!MTEF!2!1!+-% feaaeaart1ev0aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn% hiov2DGi1BTfMBaeXanrfitLxBI9gBaerbd9wDYLwzYbItLDharqqt% ubsr4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq% -Jc9vqaqpepm0xbba9pwe9Q8fs0-yqaqpepae9pg0FirpepeKkFr0x% fr-xfr-xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamyuam% aaBaaaleaacaaIXaGaaGimaaqabaGccqGH9aqpciGGSbGaaiOBaiaa% ysW7caWGRbWaaSbaaSqaaiaadsfacaaIXaaabeaakiaac+cacaWGRb% WaaSbaaSqaaiaadsfacaaIYaaabeaakiabg2da9iabgkHiTmaabmaa% baGaamyramaaBaaaleaacaWGHbaabeaakiaac+cacaWGsbaacaGLOa% GaayzkaaGaey41aq7aaiWaaeaadaqadaqaaiaadsfadaWgaaWcbaGa% aGOmaaqabaGccqGHsislcaWGubWaaSbaaSqaaiaaigdaaeqaaaGcca% GLOaGaayzkaaGaai4laiaacIcacaWGubWaaSbaaSqaaiaaikdaaeqa% aOGaaGjbVlaadsfadaWgaaWcbaGaamysaaqabaGccaGGPaaacaGL7b% GaayzFaaaaaa!5C4A! $$f(x * t, y)+ g(x, y\ \sharp\ t) = h(x, y)\ {\rm for\ all}\ x, y, t \in S,$$ where ƒ,g,h :S × S → G. As an application of (i) we solve % MathType!MTEF!2!1!+-% feaaeaart1ev0aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn% hiov2DGi1BTfMBaeXanrfitLxBI9gBaerbd9wDYLwzYbItLDharqqt% ubsr4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq% -Jc9vqaqpepm0xbba9pwe9Q8fs0-yqaqpepae9pg0FirpepeKkFr0x% fr-xfr-xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamyuam% aaBaaaleaacaaIXaGaaGimaaqabaGccqGH9aqpciGGSbGaaiOBaiaa% ysW7caWGRbWaaSbaaSqaaiaadsfacaaIXaaabeaakiaac+cacaWGRb% WaaSbaaSqaaiaadsfacaaIYaaabeaakiabg2da9iabgkHiTmaabmaa% baGaamyramaaBaaaleaacaWGHbaabeaakiaac+cacaWGsbaacaGLOa% GaayzkaaGaey41aq7aaiWaaeaadaqadaqaaiaadsfadaWgaaWcbaGa% aGOmaaqabaGccqGHsislcaWGubWaaSbaaSqaaiaaigdaaeqaaaGcca% GLOaGaayzkaaGaai4laiaacIcacaWGubWaaSbaaSqaaiaaikdaaeqa% aOGaaGjbVlaadsfadaWgaaWcbaGaamysaaqabaGccaGGPaaacaGL7b% GaayzFaaaaaa!5C4A! $$f(x + t, y)- f(x, y) = -b(f(x, y+t)- f(x,y))\ {\rm for\ all}\ x, y, t \in S,$$ where ƒ :S × S → K (a field), and b ∈ K is a constant and b ≠ 0, ±1. If b = i, the pure imaginary unit, S = R and K = C, then the above equation may be considered as a discrete analogue of the Cauchy-Riemann equations. When (R, +, −) is a commutative ring with 1, the functional equation (ii) % MathType!MTEF!2!1!+-% feaaeaart1ev0aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn% hiov2DGi1BTfMBaeXanrfitLxBI9gBaerbd9wDYLwzYbItLDharqqt% ubsr4rNCHbGeaGqiVu0Je9sqqrpepC0xbbL8F4rqqrFfpeea0xe9Lq% -Jc9vqaqpepm0xbba9pwe9Q8fs0-yqaqpepae9pg0FirpepeKkFr0x% fr-xfr-xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamyuam% aaBaaaleaacaaIXaGaaGimaaqabaGccqGH9aqpciGGSbGaaiOBaiaa% ysW7caWGRbWaaSbaaSqaaiaadsfacaaIXaaabeaakiaac+cacaWGRb% WaaSbaaSqaaiaadsfacaaIYaaabeaakiabg2da9iabgkHiTmaabmaa% baGaamyramaaBaaaleaacaWGHbaabeaakiaac+cacaWGsbaacaGLOa% GaayzkaaGaey41aq7aaiWaaeaadaqadaqaaiaadsfadaWgaaWcbaGa% aGOmaaqabaGccqGHsislcaWGubWaaSbaaSqaaiaaigdaaeqaaaGcca% GLOaGaayzkaaGaai4laiaacIcacaWGubWaaSbaaSqaaiaaikdaaeqa% aOGaaGjbVlaadsfadaWgaaWcbaGaamysaaqabaGccaGGPaaacaGL7b% GaayzFaaaaaa!5C4A! $$\phi(y+xt)-\phi(xy+xt)=\phi(y+x)-\phi(xy+x)$$ for all x,y,t ∈ R, where ϕ : R → G, is basic to the general solutions of (i). We solve (ii) on certain rings and fields.