Re: [問題] 面試問到的問題...
看板Prob_Solve (計算數學 Problem Solving)作者Leon (Achilles)時間12年前 (2012/12/13 15:48)推噓3(3推 0噓 5→)留言8則, 2人參與討論串8/8 (看更多)
※ 引述《Leon (Achilles)》之銘言:
: : 接著說明一下直線截成線段的問題。
: : 對偶的時候,點(a,b)對偶成直線y=ax+b。
: : 考慮兩個直線的交點,也就是兩條直線解聯立方程式。
: : 根據公式解,交點的座標範圍一定會在 |a|*|b|+|c|*|d| 之內。
:
: First, I don't understant your notation.
: What do you mean by the range |a|*|b|+|c|*|d| ?
:
: It seems not a range in 2D ?
:
:
: And I have the same question for you.
:
: Assume you have N lines, based on your description
: You claim there is a range for the intersection.
:
: Then, how many operations you need to calculate the range?
:
:
: --
: ※ 發信站: 批踢踢實業坊(ptt.cc)
: ◆ From: 142.136.127.136
: 推 DJWS:(1) 我指的是 Cramer's rule 那些係數 12/13 15:39
: → DJWS:(2) N個頂點對偶成直線, N條直線各自截成N條線段 ---> O(N) 12/13 15:40
: → DJWS:另外我是假設座標都是整數 如果座標-1<0<1那麼範圍就會更大 12/13 15:41
OK, I really doubt your writing..
Linear algebra 001, high school algebra
intersection of two lines.
y = ax + b ;
y = cx + d ;
ax + b = cx + d ;
(a-c)x = d - b ;
x = (d-b) / (a-c) ;
Now, please tell me how it is related to your |a|*|b|+|c|*|d|
from Cramer's rule?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 142.136.127.136
推
12/13 15:51, , 1F
12/13 15:51, 1F
→
12/13 15:53, , 2F
12/13 15:53, 2F
推
12/13 15:55, , 3F
12/13 15:55, 3F
→
12/13 15:56, , 4F
12/13 15:56, 4F
→
12/13 15:57, , 5F
12/13 15:57, 5F
推
12/13 15:59, , 6F
12/13 15:59, 6F
→
12/14 01:24, , 7F
12/14 01:24, 7F
→
12/14 03:05, , 8F
12/14 03:05, 8F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 8 之 8 篇):
Prob_Solve 近期熱門文章
PTT數位生活區 即時熱門文章