▁== ▁{ ø }) ▁return ▁ 1 ; ▁▁▁▁▁▁ ▁return ▁Count ( P 0 ) ▁+ ▁Count ( P 1 ); ▁▁ ▁} ▁ ▁These ▁algorithms ▁take ▁an ▁exponential ▁time ▁for ▁the ▁number ▁of ▁variables ▁in ▁the ▁worst ▁case ; ▁however , ▁we ▁can ▁improve ▁the ▁performance ▁by ▁using ▁a ▁cache ▁that ▁memor izes ▁results ▁of ▁recent ▁operations ▁in ▁a ▁similar ▁fashion ▁in ▁B DD s . ▁The ▁cache ▁prevents ▁duplicate ▁execution s ▁for ▁equivalent ▁sub - graph s . ▁Without ▁any ▁duplicates , ▁the ▁algorithms ▁can ▁operate ▁in ▁a ▁time ▁that ▁is ▁proportional ▁to ▁the ▁size ▁of ▁graphs , ▁as ▁shown ▁in ▁Figure ▁ 9 ▁and ▁ 1 0 . ▁ ▁Application ▁ ▁Z DD s ▁as ▁diction aries ▁Z DD s ▁can ▁be ▁used ▁to ▁represent ▁the ▁five - letter ▁words ▁of ▁English , ▁the ▁set ▁W OR DS ▁( of ▁size ▁ 5 7 5 7 ) ▁from ▁the ▁Stan ford ▁Graph Base ▁for ▁instance . ▁One ▁way ▁to ▁do ▁this ▁is ▁to ▁consider ▁the ▁function ▁ ▁that ▁is ▁defined ▁to ▁be ▁ 1 ▁if ▁and ▁only ▁if ▁the ▁five ▁numbers ▁, ▁, ▁... , ▁ ▁encode ▁the ▁letters ▁of ▁an ▁English ▁word , ▁where ▁, ▁... , ▁. ▁For ▁example , ▁. ▁The ▁function ▁of ▁ 2 5 ▁variables ▁has ▁Z ( f ) ▁= ▁ 6 2 3 3 ▁nodes ▁– ▁which ▁is ▁not ▁too ▁bad ▁for ▁representing ▁ 5 7 5 7 ▁words . ▁Comp ared ▁to ▁binary ▁trees , ▁tries , ▁or ▁hash ▁tables , ▁a