Fibonacci jerin, jerin abubuwan da ke jan hankalin masana kimiyya da masu ilimin lissafi na ฦarni, kuma an ษaure su tam tare da kayan ado, ana amfani da su a cikin nau'ikan kyawawan kyakkyawa - salo da fasaha. Jerin lambobi ne inda ake samun lamba ta gaba ta hanyar ฦara lambobi biyu da ke gabansa, farawa da 0 da 1. Wannan jeri yana nunawa a cikin sifofin halitta kamar karkatar da harsashi, lanฦwasa raฦuman ruwa, buษe ganye, da dai sauransu. na halitta alamu.
A cikin shirye-shirye, jerin Fibonacci suna magance ra'ayoyi gama gari kamar iterations, maimaitawa da haษakawa cikin sarฦaฦฦiya a hankali, yin aiki a matsayin babban ginshiฦi don dabarun ฦididdigewa da ci gaba. Kamar a cikin salon, inda yanayi daban-daban ke motsawa da fita amma wasu alamu sun yi rinjaye, hanyoyin samar da shirye-shirye suna da halaye iri ษaya. Kuma Haskell, yaren shirye-shirye ne kawai mai aiki, yana ba da wasu musamman kuma ingantattun hanyoyi don sarrafa jerin Fibonacci.
Kwamfuta Fibonacci ta hanyar Haskell
fib 0 = 0 fib 1 = 1 fib n = fib (n-1) + fib (n-2)
Wannan shi ne mafi aiwatar da kai tsaye na Fibonacci jerin a cikin Haskell, wanda ya dace da ma'anar lissafinsa kai tsaye. Yana amfani da mahimmancin ra'ayi a cikin shirye-shiryen aiki - maimaitawa. Koyaya, wannan lambar ba ta da inganci ga manyan lambobi saboda ฦididdige ฦididdiga masu yawa na ฦimar iri ษaya.
Inganta ฦwarewa tare da Memoization
import Data.Map (Map, lookup, insert, fromList) memoize :: (Integer -> Integer) -> (Integer -> Integer) memoize f = lookupAndInsert where lookupAndInsert :: Integer -> Integer lookupAndInsert x = case lookup x table of Just v -> v Nothing -> f x table :: Map Integer Integer table = fromList $ map (x -> (x, f x)) [0 .. upperLimit] fib :: Integer -> Integer fib 0 = 0 fib 1 = 1 fib n = fib (n - 1) + fib (n - 2) main :: IO () main = print $ memoize fib 30
Anan ga ingantaccen maganin matsalar mu ta amfani tunawa dabara, sau da yawa ana amfani da su a cikin harsuna masu aiki kamar Haskell. Wannan lambar tana adana ฦimar ฦididdiga a cikin tebur kuma ta bincika wannan tebur kafin gudanar da aikin maimaitawa - idan an ฦididdige ฦimar, kawai yana dawo da ฦimar daga tebur maimakon sake gudanar da lissafin.
Yanzu bari mu ci gaba mu ga yadda za mu iya zana daidaici tsakanin Fibonacci jerin da fashion duniya.
Golden Ratio da Fashion
Lambobin Fibonacci, ta hanyar rabon zinare da suke ginawa, suna ba da kaso mai ban sha'awa mai suna Golden Ratio. Wannan Girman Zinare (1.618:1) yana da daษi da kyau kuma ya fito cikin salo, ฦirar gine-gine da yanayi.
A cikin salon zamani na zamani, kunkuntar waistline ta faษo zuwa cikakkiyar kwatangwalo mai kama da Fibonacci Spiral. The Tufafin A-line, bin irin wannan tsari, yana kara tsayin jiki kuma yana kunkuntar kugu, alamar kasancewar Fibonacci akan titin jirgin sama. Har wala yau, masu zanen kaya suna amfani da wannan rabo a sane ko a cikin ษangarorin su don ฦirฦirar kamanni masu kyan gani da jituwa.
Lambar Launi na Fashion
Launuka suna taka muhimmiyar rawa a cikin salon, tare da haษuwa sau da yawa suna bin jerin Fibonacci. Kaya mai sauฦi na iya biyo baya a 1: 1: 2 haษuwa, inda jaket da wando ke raba launi, kuma riga da kayan haษi suna madubi juna. Ko, yi amfani da haษin 2:3:5 don haษin kai mai sassa uku. Ana iya lura da wannan ka'ida ta fannoni da yawa na salon salo.
Jin daษin jerin Fibonacci ba kawai game da fahimtar ilimin lissafi ko ฦididdiga ba. Har ila yau, game da tsinkayar kyawawan alamu waษanda aka tsara ta wannan jeri, a cikin fasaha, salon zamani da kuma duniyar da ke kewaye da mu.