A new approach for quantifying the relationship between brain activity patterns and depth of anesthesia (DOA) is presented by analyzing the spatio-temporal patterns in the electroencephalogram (EEG) using Lempel-Ziv complexity analysis. Twenty-seven patients undergoing vascular surgery were studied under general anesthesia with sevoflurane, isoflurane, propofol, or desflurane. The EEG was recorded continuously during the procedure and patients' anesthesia states were assessed according to the responsiveness component of the observer's assessment of alertness/sedation (OAA/S) score. An OAA/S score of zero or one was considered asleep and two or greater was considered awake. Complexity of the EEG was quantitatively estimated by the measure C(n), whose performance in discriminating awake and asleep states was analyzed by statistics for different anesthetic techniques and different patient populations. Compared with other measures, such as approximate entropy, spectral entropy, and median frequency, C(n) not only demonstrates better performance (93% accuracy) across all of the patients, but also is an easier algorithm to implement for real-time use. The study shows that C(n) is a very useful and promising EEG-derived parameter for characterizing the (DOA) under clinical situations.