Plasticity mechanism and memory formation in the chemical synapse