<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>obelisk2</author_name>
  <author_url>https://blog.hatena.ne.jp/obelisk2/</author_url>
  <blog_title>Camera Obscura</blog_title>
  <blog_url>https://obelisk.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>アルゴリズム</anon>
    <anon>アルゴリズム・パズル</anon>
  </categories>
  <description>問題： 1Ω の抵抗 10個を使い、合成抵抗が黄金比 1.6180339887..Ωにもっとも近づく場合の値を、少数第10位まで求めよ。 aΩ と bΩ の抵抗をつなげる場合、直列つなぎにすれば合成抵抗はたんに a + b Ω になりますが、並列つなぎの場合はそれらの逆数の和の逆数、つまり になるのが重要なところです。抵抗10個できわめて複雑な組み合わせをつくることができます。Ruby で求めてみました。 require 'set' def product(a, b) @ar[a].each do |i| @ar[b].each do |j| @ar[a + b] &lt;&lt; i + j @ar[a…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2017%2F05%2F26%2F203031&quot; title=&quot;1Ωの抵抗10個で黄金比の値に近づける（Ruby） - Camera Obscura&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>http://www.codecogs.com/png.latex?%5Cfrac%7B1%7D%7B%5Cfrac%7B1%7D%7Ba%7D+%5Cfrac%7B1%7D%7Bb%7D%7D</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-05-26 20:30:31</published>
  <title>1Ωの抵抗10個で黄金比の値に近づける（Ruby）</title>
  <type>rich</type>
  <url>https://obelisk.hatenablog.com/entry/2017/05/26/203031</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
